Skip to main content
gamedev.net
🔒 Locked

Per-Pixel Lighting

Started by Lurking Jun 1, 2002 at 1:23 PM 0 replies 500+ views
Original Post
Lurking
Lurking
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
zedzeek
zedzeek
>>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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.