• Advertisement


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

D3DX: Trouble with gouraud shading

This topic is 5980 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

My landscape algorithm uses ROAM, which spits out triangle fans (lets not get into performance talk here ). Now my trouble is getting gouraud shading to work, because... 1. ROAM spits out the triangles in an almost ''random'' order, making it difficult to know who the neighbours are. Consequently, it''s difficult for me to figure out a way to calculate the vertex normals myself (I presently have the face normal of course). 2. DX8 is supposed to auto-generate vertex normals for you. Well so far as I can see, this only works for indexed vertex buffers (fully indexed), which isn''t useful for me, due to the fan orientation of the algorithm. So this doesn''t work. So other that dot-product bump mapping, how can I get dynamic lighting on my terrain? I guess I could use some fancy light maps, but I also cannot figure out how to get a nice little "light-circle" to appear an an arbitrary location on my terrain due vertex positioning (eg: how do I do a small light-circle map in the middle of a huge triangle). Thanks. Any input would be appreciated. I would prefer a method that uses actual lighting if possible, since I would get the ability to use point, directional, etc, lights. Thanks, Mal.

Share this post

Link to post
Share on other sites

  • Advertisement