qt5base-lts/tests/manual/rhi/stenciloutline/material.vert
Laszlo Agocs 2c639aea76 rhi: Add a manual test for simple stencil-based outline
Interesting on its own just because it exercises stencil testing,
unlike any of the other existing manual tests.

In addition it serves as a base example for how outlines could be
done, it is one possible approach at least. (render with stencil
write, then render again slightly scaled up with a solid color with
testing against the stencil buffer content)

Change-Id: I0c845a9004136f229cab037f6f0aab2f772bdd76
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-10-25 15:19:41 +02:00

14 lines
181 B
GLSL

#version 440
layout(location = 0) in vec4 position;
layout(std140, binding = 0) uniform buf {
mat4 mvp;
vec3 color;
};
void main()
{
gl_Position = mvp * position;
}