Rennie Johnson
10-31-2011, 09:22 AM
I want to do color bayer processing in a GLSL fragment shader. In order to determine whether the texel is red, green or blue, I need to know what the X and Y offsets are.
Is there a function available in a fragment shader that will give me the X and Y position of that texel, or do I have to do this in a vertex shader and pass the information on to the fragment shader in a varying vec2 variable?
Is there a function available in a fragment shader that will give me the X and Y position of that texel, or do I have to do this in a vertex shader and pass the information on to the fragment shader in a varying vec2 variable?