Per-Pixel Lighting
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
>>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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement