Jump to content
  • Advertisement
Sign in to follow this  
DamianOmen

Another real-time per-pixel lighting demo

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

Re-worked my shaders to compute specular values better. I'm also handling the transformation of spaces better. Some screenshots follow. You may grab the demo if you want here, or from my site. Same as before, this is GLSL, so if you're running Vista you'll be out of luck unless you have an ICD from you OEM (I doubt it). Here on the left is directional specular per vertex lighting, the other is per pixel Here the one on on the left is positional specular per vertex, the other per pixel Here i was messing with the specular exponent, same as b4, left is per vertex, right is per pixel, both positional specular The best thing about this is that the object is defined in object space, the light in world space. Each shader realizes this and handles it correctly. My previous demo did not. This means that the object can be translated/rotated in world space, and rotated in object space, and the lighting works properly. Sounds trivial, but when you're knee deep in shader code you have to have these concepts sorted. Now I think I'm in a good position to get normal mapping working at last.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!