Debian Codegraph @

tests/auto/buildtimeqsb/tess.tese

raw
1 #version 440
2
3 layout(triangles, fractional_odd_spacing, ccw) in;
4
5 layout(location = 0) in vec3 inColor[];
6
7 layout(location = 0) out vec3 outColor;
8
9 // these serve no purpose, just exist to test per-patch outputs
10 layout(location = 1) patch in vec3 stuff;
11 layout(location = 2) patch in float more_stuff;
12
13 layout(std140, binding = 0) uniform buf {
14 mat4 mvp;
15 float time;
16 float amplitude;
17 };
18
19 void main()
20 {
21 vec4 pos = (gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position);
22 gl_Position = mvp * pos;
23 gl_Position.x += sin(time + pos.y) * amplitude;
24 outColor = gl_TessCoord.x * inColor[0] + gl_TessCoord.y * inColor[1] + gl_TessCoord.z * inColor[2]
25 // these are all 1.0, just here to exercise the shader generation and the runtime pipeline setup
26 * stuff.x * more_stuff * (gl_TessLevelOuter[0] / 4.0) * (gl_TessLevelInner[0] / 4.0);
27 }