Applying fog to geometry only, not background
Hi, I would like to apply a white fog to my polygons, but not to the background (I have a nice skybox I do not want to lose). The idea is to have polygon colour fade with distance without turning the background all white. Any ideas would be much appreciated.
PS: If possible, without using extensions...
What About...
theNestruo
Syntax error in 2410
Ok
glDisable (GL_FOG);DrawBackground (); /* Draw the nice skybox */glEnable (GL_FOG);DrawGeometry (); /* Draw all the geometry */
theNestruo
Syntax error in 2410
Ok
Oh, wait you want it to blend with your background. Sorry I misunderstood. Someone, it was in the OpenGL forums a few days ago just can''t remember who, did this by making objects more transparent as they moved farther away from the camera. It looked very nice and is probably what you are trying to accomplish. I''ll try to find the thread.
Ok found it! It was _DarkWing_ who made the post here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=199209
You can probably email him for details on the technique he used, but it looks great and is probably what you are after.
http://www.gamedev.net/community/forums/topic.asp?topic_id=199209
You can probably email him for details on the technique he used, but it looks great and is probably what you are after.
Man is that fast help or what - my fog works beautifully on geometry and not on background. Thanks a lot.
Anon, I can't use darkwing's technique (even though it looks awesome) beacuse my background is not a single colour, it is a skybox with a gradient from white to blue, therefore progressive transparency with distance would really make the model seem transparent!
[edited by - Keermalec on January 6, 2004 6:18:09 PM]
Anon, I can't use darkwing's technique (even though it looks awesome) beacuse my background is not a single colour, it is a skybox with a gradient from white to blue, therefore progressive transparency with distance would really make the model seem transparent!
[edited by - Keermalec on January 6, 2004 6:18:09 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement