Sign in to follow this  
renman29

D3DXVec3Project result does not match texel's final screen coord

Recommended Posts

:( If I use a black texture with one red texel on it(so I can easily identify it), and texture a triangle on a polygon in 3D space - I notice that that texel does not appear at the same location if I manually transform the texel by pretending it's a vertex and using D3DXVec3Project. (Although it appears to work on regular vertices). The triangle is exactly the same dimensions on the texture map so I thought it would work. Maybe it has something to do with the way the texture is interpolated accross the polygon? They appear close but several pixels off most of the time. It's weird. Any ideas on how I can get the true screen position of any given texel? Any suggestions or comments are completely welcome. :)

Share this post


Link to post
Share on other sites
My guess would be that the problem is with your calculation of the texel's position in 3D space. I can't tell you how to calculate that, but if you post how you determine that, I may be able to find the problem there.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this