Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

skallio

Index buffers & Lighting?

This topic is 6329 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I recently read from the D3D8 SDK that to use proper lighting on scenes you have to use normals in FVF. Well, if the normals for each vertex is supposed to face in the same direction the polygon it''s connected to does, how am I supposed to specify the normals while using index buffers where one vertex can be shared for example 6 polygons? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Many times, you have a per vertex normal.

In fact, that''s better for cases where you have something like a sphere, where several faces may share one vertex. In that case, the vertex normal is the average of all the normals of the shared faces, which makes the lighting look smooth. If you consider the same example and every normal was a face normal, it would be harder to interpolate lighting across faces...

Share this post


Link to post
Share on other sites
Thanks

I think it''ll sort itself out because I''m using gouraud shading which usually (?) needs per vertex normals..

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!