Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Interpolation qualifiers in interface blocks

Threaded View

  1. #1
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    273

    Interpolation qualifiers in interface blocks

    Hello,

    I'm playing with geometry shaders, so I have to use interface blocks for vertex attributes. I haven't find much documentation about this (perhaps I missed the line in the specs) so I'm a bit lost here.

    supposing this interface block in the vertex shader:
    Code :
    out VertexData
    { 
        vec2 TextCoordInterp;
        vec3 NormalInterp;
    }  vertexOut;

    and its corresponding in the geometry shader:
    Code :
     in VertexData
    { 
        vec2 TextCoordInterp;
        vec3 NormalInterp;
    } vertexIn[];

    All my tries of specifying the interpolation qualifier ends with a compiler error (I'm on NVidia)

    Placing the "smooth" keyword before interface blocks' members (for instance smooth vec2 TextCoordInterp;) ends with the next error: error C7561: OpenGL requires 'in/out' with '?'

    I know that smooth is the default qualifier for interpolation, but I would like to know how to correctly specify it.

    Thanks.

    Edit: Forget this. I was missing the point that interpolation now must be defined between GS and FS
    Edit 2: Anyway, I can set the interpolation qualifier between GS and FS if I don't use an interface block, but how would do I specify it if want use interface blocks?
    I'm having the same compiler error.
    Last edited by Ffelagund; 08-26-2013 at 05:29 AM.
    "!I don't know... fly casual"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •