Fog with projected textures?

New Message Reply Date view Thread view Subject view Author view

Robert Webb (robertw++at++wormald.COM.AU)
Mon, 31 Jul 1995 14:46:17 +1000 (EST)


Hi all,

I am doing a projected textures type of thing, and it's finally very close
to working fully, but I still have a problem with fog.

The standard projected textures demo on the SGIs (which requires four
passes), starts off by clearing the screen to a color that represents the
ambient light. However I want to first draw the sky and stars etc, so
rather than clear the screen to this grey color, I use the first pass of
pfDraw() to not only prepare the zbuffer, but also to put this grey color
into any pixels that are touched. I do this by using a completely opaque
pfFog. This works fine, and means that I only grey out pixels that I know
will be touched again in the second call to pfDraw().

Before the second pfDraw(), I set the fog back to how it should be, but for
some reason it doesn't work correctly. I have used gldebug and all the GL
fogvertex calls look OK to me, but the fog ends up looking much darker than
it should. I am using zfunction(ZF_EQUAL) on the second pass, should this
affect the fog though? Any ideas on why this might be happening, or
alternatively, does anyone know another way to make sure that every pixel
pfDraw() renders comes out in the same color (other than using an opaque
fog)?

Thanks heaps,
Rob.

------------------------------------------------------------------------------
 _
|_) _ |_ _ ._ _|_ \ / _ |_ |_ robertw++at++wormald.com.au
| \(_)|_)(/_| |_ \/\/ (/_|_)|_)o

"Informer, you no say daddy me Snow me I'll go blame, a licky boom boom down"
                                                                - Snow.

------------------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:43 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.