PDA

View Full Version : Any tutorials on Per-vertex lighting?



Lurking
10-03-2001, 04:06 PM
Hey, currently i am working on a project w/ opengl. I am trying to write a class system for light and desided to go w/ per-vertex lighting. Does anyone know where i can find a good tutorial on that subject. Thanx!

- Lurking

MrShoe
10-03-2001, 09:46 PM
I might be wrong, but BASICALLY per vertex lighting is giving normals to verteces and not to faces, this creates a smooth look intead of a flat look.

SirKnight
10-08-2001, 02:01 PM
The OpenGL lighting system is per vertex already. But if you want to do it your self (which i assume you would be using a vertex program, if not no big deal) then its still pretty easy. Check out the 'lit quad' demo in the opengl sdk. It shows the math of vertex lighting in a vertex program.

-SirKnight