Jump to content
  • Advertisement
Sign in to follow this  
Rekna

Problem with cube maps

This topic is 5194 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

I have a scene in which I want to have a cube mapped reflective sphere. However i'm having a problem. I can get everything to work fine except the reflection always tracks with the camera. I'm wondering if this might be a side effect of gluLookAt. One thing that works is if I calculate my cube map dynamically and take the pictures along the axis defined by glu lookat. However I don't want to use dynamic cube maps all the time. I should be able to just rotate around a cube mapped surface as far as I understand. Anyone have any ideas?

Share this post


Link to post
Share on other sites
Advertisement
I think you must play with the texture matrix a little.
I have the same problem but in pixel shader with GLSL. ANd i dont know how i can do that in glsl.but using the fixed pipeline you rotate the texture matrix according the camera... i think..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I figured it out last night.

I did exactly as you said. I got the modelview matrix zeroed out the translational then multiplied the texture matrix by it's transpose.

thanks

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!