Advertisement

Strange problems always happen to me ...

Started by January 12, 2001 04:25 PM
6 comments, last by penetrator 24 years, 1 month ago
Ok sit down and listen: I''ve a heightmap (out of a .bmp file). At the end of the heightmap I immediately have put a QUAD. When I fly over the terrain everything is fine, after the mountain I get the plain (QUAD) surface. But, if I enable fog, when I travel on the mountains it is fine, when I reach the QUAD and I move the camera left and right, the fog runs to me covering almost all the QUAD and NOT the mountains. What the hell ... If you need screenshot of this strange behaviour I''ll send you !
I guess that happens because fog is computed per-vertex, so I suggest you tesselate that quad (split it into lots of smaller quads).
Advertisement
theres a hint to enable perpixel fog. might wanna see if GL_LINEAR or GL_EXP2 makes a differnece as well ive seen drivers that bum out in certain modes

http://members.xoom.com/myBollux
Guys, 1° af all thanks for your advices ! I''ll try to compute fox perpixel instead of pervertex and if it doesn''t solve I''ll tessellate the quad !

Thanks again

how to enable per pixel fog becuase even im stuck with HUGE quads. And the 3 fog modes dont seem to help.
glHint(GL_FOG_HINT, GL_NICEST) will enable per pixel fog. The default(I think) is GL_DONT_CARE if you want to change it back.
Advertisement
Well I enabled perpixel fox with glHint(GL_FOG_HINT, GL_NICEST)
but my impression is that this instruction it''s not enough when you deal with huge QUAD''s. I wonder how to deal with this !

ok, generating a quad strip instead of a huge QUAD now works, but of course it had a negative impact on performances ...

This topic is closed to new replies.

Advertisement