• Advertisement

Archived

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

Per-Pixel Lighting

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