Sign in to follow this  
Rekna

Problem with cube maps

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
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

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