Skip to main content
gamedev.net
🔒 Locked

fogging problems

Started by sofsenint Aug 14, 2003 at 8:08 PM 0 replies 750+ views
Original Post
sofsenint
sofsenint
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]
-----------------------------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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.