summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/tessellation-modes/shaders/isolines.tcs
blob: 624af51cc4b7874a8f46b86a64072a846b9c584b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#version 400 core

layout( vertices = 4 ) out;

uniform float outer[4] = float[]( 1.0, 1.0, 1.0, 1.0 );

void main()
{
    // Pass along the vertex position unmodified
    gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;

    // Set the tessellation levels
    gl_TessLevelOuter[0] = outer[0]; // number of isolines
    gl_TessLevelOuter[1] = outer[1]; // divisions along isoline
}