Jump to content
  • Advertisement

Archived

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

Lurking

Per-Pixel Lighting

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

Ok, I have been reading alot about per-pixel lighting at the nvidia site as well in the Game Programming Gems1. I have considered adding it into my current engine in which i am working on right now. Well i understand most of the math behind it and understand how it works. How would i loud a gray-scale map or height map w/ opengl so i can get the normals on a per-pixel basis and what is this png file in all the demos? - Lurking

Share this post


Link to post
Share on other sites
Advertisement
>>How would i loud a gray-scale map or height map w/ opengl so i can get the normals on a per-pixel basis<<

u have to first convert the heightmap into a normal map ie greyscale texture to a RGB texture there are many ways to do this the simpliest is to compare neighbouring pixels + build the texels colour based on that, there is a lot of code around that shows howto do this, the nvidia developer site has some

>>and what is this png file in all the demos?<<

?

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites

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