How do you use normals in D3DIM?

Started by
0 comments, last by Dave2001 23 years, 9 months ago
How do you calculate and use normals in Direct3D immediate mode? I can''t find a tutorial anywhere that shows how to use them. Please help. Thanks! Dave2001, MAILTO(Forrester6@msn.com);
Advertisement
First you need to know which triangles share the same vertices. Then for each vertex compute the average of the normals for the triangles that use it. Use this averaged normal for the vertex normal, and you''ll get smooth shading of your model. (Don''t forget to renormalize the normal, so it is of unit length)

- WitchLord

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement