Jump to content
  • Advertisement
Sign in to follow this  
Josh Klint

Tessellation Trouble

This topic is 1937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to get some old tessellation code running, but my objects just disappear when I set the draw mode to GL_PATCHES. Here is my control shader:
#version 410

layout(vertices = 3) out;

in vec4 ctrl_position[];

out vec4 eval_position[];

void main()
    float TessLevelInner = 1.0;
    float TessLevelOuter = 1.0;

    if (gl_InvocationID == 0) {
        gl_TessLevelInner[0] = TessLevelInner;
        gl_TessLevelOuter[0] = TessLevelOuter;
        gl_TessLevelOuter[1] = TessLevelOuter;
        gl_TessLevelOuter[2] = TessLevelOuter;
    eval_position[gl_InvocationID] = ctrl_position[gl_InvocationID];
And my evaluation shader:
#version 400

layout(triangles, equal_spacing, ccw) in;

in vec4 eval_position[];

void main()
    gl_Position = (eval_position[0] * gl_TessCoord.x + eval_position[1] * gl_TessCoord.y + eval_position[2] * gl_TessCoord.z);
Do you see anything wrong? Edited by Josh Klint

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!