PDA

View Full Version : Something about tessellation shader.



ScareS
05-24-2016, 09:43 AM
Hello everyone , I'm a newbie of Opengl,:)
I want to know ,when I write TCS like this
#version 420 core

layout (vertices =16) out;
void main(void)
{
if (gl_InvocationID == 3)
{
gl_TessLevelInner[0] = 4.0;
gl_TessLevelInner[1] = 4.0;
gl_TessLevelOuter[0] = 4.0;
gl_TessLevelOuter[1] = 4.0;
gl_TessLevelOuter[2] = 4.0;
gl_TessLevelOuter[3] = 4.0;
}

gl_out[gl_InvocationID].gl_Position =gl_in[gl_InvocationID].gl_Position;
}
};
This can break a patch(actually a quad) to a 4*4 grid.I want to where those 16 output control points are?what if I set the value to 11 or 12?
Thanks for answering my question.