Skip to main content
GameDev.net gamedev.net
🔒 Locked

Normal Vector and winding

Started by stevenie Jun 16, 2010 at 12:45 AM 0 replies 800+ views
Original Post
stevenie
stevenie
Hi everyone,

I'm learning lighting from NeHe. In the example. the author uses normal vectors to tell opengl which face is "up".

I'm wondering why not use winding instead of normal vector? If I have some complex objects, do I need to give a normal vector for every triangle? Thanks!

Steven
Hodgman
Hodgman
Normals are supplied per-vertex, wheras front/back facing is determined per-triangle (from the winding order).

It's possible/valid to have a triangle facing up, where two of it's vertices have normals pointing up and one has a normal pointing down.

Usually, all the normals on a triangle won't be facing in the exact same direction -- if they were, then the lighting would have jagged edges (see Flat vs smooth shading)

Topic Locked

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

Sign in to reply to this topic.