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
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?
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 );<<