| 1 |
#version 450 |
| 2 |
|
| 3 |
layout(vertices = 4) out; |
| 4 |
layout(location = 0) patch out vec3 vPatch[2]; |
| 5 |
layout(location = 2) out vec3 vVertex[]; |
| 6 |
layout(location = 0) in vec3 vInput[]; |
| 7 |
|
| 8 |
void main() |
| 9 |
{ |
| 10 |
vVertex[gl_InvocationID] = |
| 11 |
vInput[gl_InvocationID] + |
| 12 |
vInput[gl_InvocationID ^ 1]; |
| 13 |
|
| 14 |
barrier(); |
| 15 |
|
| 16 |
if (gl_InvocationID == 0) |
| 17 |
{ |
| 18 |
vPatch[0] = vec3(10.0); |
| 19 |
vPatch[1] = vec3(20.0); |
| 20 |
gl_TessLevelOuter[0] = 1.0; |
| 21 |
gl_TessLevelOuter[1] = 2.0; |
| 22 |
gl_TessLevelOuter[2] = 3.0; |
| 23 |
gl_TessLevelOuter[3] = 4.0; |
| 24 |
gl_TessLevelInner[0] = 1.0; |
| 25 |
gl_TessLevelInner[1] = 2.0; |
| 26 |
} |
| 27 |
} |