rahul.bahl
10-15-2003, 03:50 AM
Hi,
I am developing an application which integrates Cg vertex and fragment programs with OpenGL API.
I am required to query texels from textures. I know the coordinates of the texel, which I have normalised. Do I pass this as it is after normalisation to my fragment program, so that appropriate texel is queried?
I am confused as for certain cases I got negative x and y coordinates to query; and do not know what this mean. I think -ve x-value means the projected point is not in texture and can be ignored or left as it is. And -ve y-value is because textures are stored from bottom left corner (inverted).
Please help and Thanx for your time.
I am developing an application which integrates Cg vertex and fragment programs with OpenGL API.
I am required to query texels from textures. I know the coordinates of the texel, which I have normalised. Do I pass this as it is after normalisation to my fragment program, so that appropriate texel is queried?
I am confused as for certain cases I got negative x and y coordinates to query; and do not know what this mean. I think -ve x-value means the projected point is not in texture and can be ignored or left as it is. And -ve y-value is because textures are stored from bottom left corner (inverted).
Please help and Thanx for your time.