PDA

View Full Version : wierd bump mapping problem



SirKnight
06-28-2002, 05:39 PM
I just finished a simple little bump mapping demo which i made to get more familar with Cg (well and bump mapping in general http://www.opengl.org/discussion_boards/ubb/wink.gif) and at first i couldnt get it to work for crap. I would see a few bumps (by few i mean like 3 or 4) but everything else was all black, or close to all black. It looked very wierd.

I need to also say that i had in tex0 the normal map from that photoshop plugin and in tex1 i had my tangent space surface_to_light vector w/ a normal cube map. In tex2 i have my regular texture which is just some bricks i made in PSP7.

Now get this, i swapped what was in tex0 and tex1 (tex0 now has the light vector and tex1 now has the normal map) and it worked! Now since its just a quad im rendering it doesnt look quite as impressive as say doom 3 http://www.opengl.org/discussion_boards/ubb/wink.gif but its ok for what i have.

Could this be a driver bug or something? How in the hell can it work fine if the normal map is in tex1, and light vec in tex0 but not the other way around? I did change the appropriate things in the Cg shader and texture binds and stuff. This doesnt make sence.

I have a GeForce 4 Ti 4400 w/ 29.42 dets, win xp pro, p3 600, etc.

Im glad i finally got some kind of bump mapping thing going, i have spent forever with this stuff and it never worked right. Untill now kinda. Darn tangent space. http://www.opengl.org/discussion_boards/ubb/wink.gif

-SirKnight