Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

realistic fog

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 CoderTCD   Members   

128
Like
Likes
Like

Posted 28 September 2001 - 03:48 AM

I use standard opengl fogging functions and linear fog. But It has a problem that opengl calculates the distance using depth in z axis. I want it to calculate the distance using distance in x y and z. here''s the formula I want it to use distance=squareroot(xdistance^2+ydistance^2+zdistance^2) If it uses his formula the fog will be like a sphere around the viewer. someone told me that I could make it using extentions but I couldn''t find any resource for that. Does anyone have an idea?

#2 Anonymous Poster_Anonymous Poster_*   Guests   

Likes

Posted 28 September 2001 - 08:27 AM

There''s an article on spherical fog in the articles & resources section. Have you read that?

#3 zedzeek   Members   

528
Like
Likes
Like

Posted 28 September 2001 - 10:44 AM

the fog distance extension will do the above

from the spec
>>When the fog distance mode is EYE_RADIAL_NV, the fog distance z is computed as the Euclidean distance from the center of the fragment in eye coordinates to the eye position. Specifically:
z = sqrt( xe*xe + ye*ye + ze*ze );<<




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.