Archived

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

sofsenint

fogging problems

Recommended Posts

sofsenint    122
I recently started trying to add fogging effects to my 3D engine. However, I am having some problems. I have an X file object that is fogged correctly. However, I have a simple rectangle (not loaded from file, coords coded by hand) that gives strange results. The four corners of the rectangle are fogged correctly. However, moving away from the corner, the color gets nearer and nearer the fog color until it becomes 100% that color at what I think is the end position of my fog(I am using linear fog for now). I am applying a texture to the rectangle and am using a custom vertex format. Does anyone have any idea what my problem could be? Edit- I finally figured it out, and I feel so stupid now that I have! I was using per-vertex fog, so the calculations were being done only on the corners of the rectangle, making it seem incorrect(it's a big rectangle). ----------------------------- Weeks of programming can save you hours of planning. There are 10 kinds of people in this world-- those who understand binary and those who don't. [edited by - sofsenint on August 14, 2003 12:45:31 AM]

Share this post


Link to post
Share on other sites