[osg-users] Emulate Fog with TexGen
Bradford, Chase
CHASE.BRADFORD at saic.com
Fri Aug 3 09:01:35 PDT 2007
Hey Everyone,
I've been trying to emulate a fade to transparent effect (think of a
linear fog that works on alpha, not color) using a 1D texture with 2
texels, 0 = opaque, 1 = transparent. My problem is with generating the
texture coordinates
I thought I could use a texgen with EYE_LINEAR and an s plane of (0, 0,
1/far_dist, 0) but that doesn't produce the correct result. The
texture's wrap mode is GL_CLAMP. I've also tried negating 1/far_dist.
Am I doing anything obviously wrong?
Thanks for any info,
Chase
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070803/99cc74cd/attachment.htm
More information about the osg-users
mailing list