Advertisement

Shading Algorithm

Started by March 02, 2002 09:11 PM
1 comment, last by cb007sax 22 years, 11 months ago
Does anyone know a site with an example of some sort of shading algorithm? I am loading polygons and drawing triangles, and i have face shading by calculating the normals of each face. I know vertex normalizing can shade but i dont know how. I''ve also heard of Phong and Goaroud shading and such. Anyone have a website or resource for this? Thanks
first try vertex lighting(shading). Calculate normal of each vertex by adding together normals of all faces that share it and normalizing. this will give you *much* beter look than face normals.

There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
Advertisement
Your in luck: opengl does the shading for you. You just need to tell it what kind(GL_SMOOTH, GL_FLAT) and set up lights and give vertex normals.

This topic is closed to new replies.

Advertisement