Per-Pixel Lighting

Started by
0 comments, last by Lurking 21 years, 10 months ago
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
- Lurking
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

This topic is closed to new replies.

Advertisement