Hi all,
Is there anyway I can setup the out vertices with uniforms(dynamically) in Tessellation Control Shader?
layout(vertices = 16) out;
Thanks and Regards,
Hi all,
Is there anyway I can setup the out vertices with uniforms(dynamically) in Tessellation Control Shader?
layout(vertices = 16) out;
Thanks and Regards,
That number represents the number of vertices you provide to the tessellator. It is fixed and inflexible. The amount of tessellation is not; it’s controlled with a different value.
What are you doing that you need a varying patch size?
Hey Alfonse,
I want to make my shaders in a way so that they can take a bezier patch of any order as I don’t know beforehand the order of patch.
Thanks and Regards,
Well, you can either use a fixed order for your patches or stop using tessellation shaders and do something else to tessellate your patches.
One more problem is there that the GL_MAX_PATCH_VERTICES has value 36477. But glPatchParameteri doesn’t accept more than 30 vertices. It says “invalid value”.
One more problem is there that the GL_MAX_PATCH_VERTICES has value 36477.
That’s the value of the enumerator GL_MAX_PATH_VERTICES
. You have to call glGetIntegerv
with the enumerator to get the actual limit.
Thanks Alfonse, my bad I was printing GL_MAX… directly. Yes the limit is 32 when I print it with glGetIntegerv.
Thanks a lot.