View Full Version : how to look up texture3d data with non normalized coordinate

07-13-2014, 08:02 AM
At the moment, I am devlopping a project with OpenSceneGraph and GLSL,
during which I have to do some calculation. So the data array is passed
into vertex shading program with 3D texture, But I can figure out how to
get the data stored in 3d texture, because the texture data is look up
with normalized coordinate.
I want to know is there a method to get the data with non normalized coordinate,
just like:
uniform sampler2DRect tex;
float data =texture2DRect(tex,vec2(x,y));//x,y is non normalized coordinate.
Thank you for your help.