CSC3223_Graphics_For_Games_OpenGL_Rasteriser / OpenGLGraphics / displaceTCS.glsl
displaceTCS.glsl
Raw
#version 400 core
 layout ( vertices =4) out; //numverticesinoutputpatch

 in Vertex {
 vec2 texCoord ; //FromVertexShader
 } IN []; //Equaltosizeofthedrawcallvertexcount
 out Vertex {
 vec2 texCoord ; //ToEvaluationShader
} OUT []; //Equaltothesizeofthelayoutvertexcount

void main () {
 gl_TessLevelInner [0] = 16;
 gl_TessLevelInner [1] = 16;
 gl_TessLevelOuter [0] = 16;
 gl_TessLevelOuter [1] = 16;
 gl_TessLevelOuter [2] = 16;
 gl_TessLevelOuter [3] = 16;

 OUT [ gl_InvocationID ].texCoord = IN [ gl_InvocationID ].texCoord ;

 gl_out [ gl_InvocationID ].gl_Position = gl_in [ gl_InvocationID ].gl_Position ;
}