very basic question: do I have to pass color values and texture coordinates through a geometry shader?
I wrote a simple passthough GS that renders the geometry fine but OpenGL fails to include color and texcoord values. If I remove the GS and use only the vertex shader and fragment shader, color and texcoords are fine.
thanks for your fast reply! I did try to pass the color and texcoord through the shader but glDrawElements() didn’t like that. And yes the nvidia compiler compiles and links without any warning :(.
could you please point me to a comprehensive tutorial or at least to a complete sample(maybe version 150+)? So far I didn’t find any GS sample passing color and texture coords.
Here is a shader that passes color values across all shaders the vertex shader. The color comes in as vColor and is assigned to vFragColorVs in the vertex shader. It then comes into the geometry shader as vFragColorVs and gets assigned to vFragColor. The fragment shader then has vFragColor come in and assigns it to gl_FragColor.