| 1 |
#version 440 |
| 2 |
|
| 3 |
layout(vertices = 3) out; |
| 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 out vec3 stuff; |
| 11 |
layout(location = 2) patch out float more_stuff; |
| 12 |
|
| 13 |
void main() |
| 14 |
{ |
| 15 |
if (gl_InvocationID == 0) { |
| 16 |
gl_TessLevelOuter[0] = 4.0; |
| 17 |
gl_TessLevelOuter[1] = 4.0; |
| 18 |
gl_TessLevelOuter[2] = 4.0; |
| 19 |
|
| 20 |
gl_TessLevelInner[0] = 4.0; |
| 21 |
} |
| 22 |
|
| 23 |
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position; |
| 24 |
outColor[gl_InvocationID] = inColor[gl_InvocationID]; |
| 25 |
stuff = vec3(1.0); |
| 26 |
more_stuff = 1.0; |
| 27 |
} |