Jump to content
  • Advertisement
Sign in to follow this  

Projecting a texture to normalized screen coordinates

This topic is 4778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, im having a slight problem getting texture projection to work based on the camera's view correctly. Ive been using projected textures for lighting etc for a while now and understand how it works, but i cant seem to get the projection planes to match the view frustum when im trying to use projected textures for reflection/refraction shaders. I get strange distortions dependant on how far up or down the camera is tilted, despite that my projection planes are using the forward, right and up vectors of the camera. Im not sure if it has something to do with how gluPerspective works in comparison to the texture coordinate generation. The only fix i have been able to do is to project the texture using window coordinates in the Fragment Shader, however this is introducing crap i'd rather have per vertex. If anyone could help that would be cool.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!