Hi Carlos,

On 2/15/07, Carlos Zoido <[EMAIL PROTECTED]> wrote:
I have implemented a spotlight based on the spotlight example on osg but
it's projecting on the front and back sides...
How should i implement a clip plane or something to prevent the light from a
spotligth projecting at both sides?

To the clip the spot light out one can use a second texture unit with
a 1D texture and associated texgen that points along the axis of the
spotlight, the texture masks out the pixels from behind.

The other way is to use a fragment shader to decide whether a fragment
is in front or behind and then do the appropriate texture reads and
blending according to this.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to