No now I think about it, that wouldn't work. What you need is for the actual depth test to depend on the sprite centre, which can't be done with the usual z-test. Sounds like the occlusion test is the way forward.
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roderick Kennedy Sent: 04 January 2007 15:57 To: osg users Subject: RE: [osg-users] Light point depth How about a billboard sprite shader that takes z depth from the sprite centre? _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zach Deedler Sent: 04 January 2007 15:37 To: 'osg users' Subject: RE: [osg-users] Light point depth Hmmm, looks like there is no simple solution. For now, I'll just try to offset the light points more, and put the more elegant solutions on the back burner. Thanks for all the ideas everyone. Zach _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz Sent: Thursday, January 04, 2007 10:17 To: 'osg users' Subject: RE: [osg-users] Light point depth I don't care if the light point occludes objects within a few meters. Would using a PolygonOffset work with a meter offset? I believe PolygonOffset won't work for you when viewing the light at an obtuse angle, say from the side, and slightly in front of, the vehicle. In such a case, the further headlight would need a greater depth offset than the near headlight to in order to completely avoid intersecting the vehicle body. In general, whether PolygonOffset produces acceptable results or not varies depending on available depth buffer precision, and how you've set your near/far planes. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> 303 859 9466
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
