• Advertisement

Archived

This topic is now archived and is closed to further replies.

Normals Reversed with Per-Pixel Lighting

This topic is 5305 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''ve been fighting with per-pixel lighting, trying to get it to work with my project for quite some time. I managed to get it to work, but for some strange reason the vertex shader is reading the normals of all the meshes backwards - forcing me to manually reverse the sign of the input register that contains the normal in the vertex shader manually. It worked, but I still want to know why It''s behaving like that. I have culling set to counter-clock wise (the standard), so I can''t see why it''s doing this. Does anyone have any suggestions on how to fix this? (I don''t really like changing my vertex shader to read something that isn''t "right").
My Project Homepage (Infinity) | E-Mail Me | Message Me on AIM

Share this post


Link to post
Share on other sites
Advertisement
OMG i'm such an idiot - I simply forgot to include the Normal Map texture in the second texture stage - no wonder I wasn't getting that "bump mapping" effect. It works fine now, and I don't have to reverse the register in the vertex shader for it to work. The effects are spectacular .

[edited by - JoshT172 on August 18, 2003 11:22:31 PM]

Share this post


Link to post
Share on other sites

  • Advertisement