PDA

View Full Version : A problem about projective texture mapping when using unclamped float texture



ChinaShrimp
01-09-2005, 06:03 PM
Hi,
I implemented the projective texture mapping successfully using the common float texture, whose scope is [0,1]. Now I want to project an unclamped texture using the NV extension-GL_TEXTURE_RECTANGLE_NV and GL_FLOAT_RGBA32_NV. Thanks for your help, I successfully load all the unclamped textures.
Now because I am using the unclamped float texture, so I will replace tex2Dproj with texRECTproj in the fragment program. But after doing these, I get a wrong result. The result using the clamped float texture and tex2Dproj is correct. Anyone has the experience to do with this problem?


void main(float4 texCoordProj : TEXCOORD0,
out float4 color : COLOR,
uniform samplerRECT projectiveMap)
{
// Fetch color from the projective texture
color = texRECTproj(projectiveMap, texCoordProj);
} I will appreciate if anyone can give me some detail description about how to use texRECTproj :confused:
Thank you in advance!

jra101
01-10-2005, 09:50 AM
Did you change your app to specify the texture cooridnates for the rectangle texture in the [0..texture width]x[0..texture height] range instead of the [0..1] range?