Sign in to follow this  
ChokingDeath

Cube Mapping Hell

Recommended Posts

ChokingDeath    136
I'm trying to get a cube map to work properly... it's a very simple cube map (not dynamic or anything like that even) A short description: I have a skybox that I wish to use as my cube map as well for reflection purposes. Reflection calculations must be done in the fragment shader as the reflected surface is going to be bump-mapped. Result: The reflective surface is always black. So far: I've made sure that the images get loaded as textures, and they seem to be just fine there. I've tried to explicitly set the surface normal to non-0, still black. As far as I can tell, there is no problem in the shader. Below, is the code I use for the texture loading: (invoked via: void loadCubeMap(const char* fNorth, const char* fEast, const char* fSouth, const char* fWest, const char* fUp, const char* fDown, GLuint* name); http://muer.njoerdba.com/paste/view.aspx?id=23169f1b-73bb-476b-8971-6964d5395e69 And the shaders: http://muer.njoerdba.com/paste/view.aspx?id=98edd446-b8ff-479a-88ac-c5a6084d6e7b And the rendering loop: http://muer.njoerdba.com/paste/view.aspx?id=6876f922-fa94-4061-89c2-8102c3f3e8b3 Please forgive any silly things you find... I've been hacking at it for hours trying everything I can think of to make it work. CD

Share this post


Link to post
Share on other sites
zedzeek    528
i guess youre not loading the texture correctly
try glinterecpt u can set it up so at a keypress it will write save the textures (including cubemaps) as files

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