hybr wrote:
> Hi,
> 
> If u didn't solved that yet - try 2 things:
> 1st: when doing prerender - on root stateset set GL_DEPTH_TEST to ON|OVERRIDE 
> and  DEPTH attrib to LESS and turn it ON|OVERRIDE(seems like depth write 
> turned off for transparent objects by default, which is right thing in 
> general :D )
> 2nd: when doing prerender - render depth with a shader and set there 
> gl_FragColor.a = 1.0;
> 
> Cheers,
> Sergey

Hi,

 Thank you for digging :).

Good observation, GL_DEPTH_TEST influences the z-buffer (of course you would 
say...). 
Actually, when accessing a depth texture in a shader in GLSL 1.2 
if DEPTH_TEST is ON 
it has to be passed as a sampler(2D/Rect)Shadow
else as a sampler(2D/Rect).
This may help someone someday.

Actually, I had just forgot to check my texture units (I thought I had, but I 
had just begun and  not finished) and wrote z-buffer on a unit used transparent 
faces use.

I didn't want to push it on the top of the topics, but I have to reply to any 
help.

Cheers,


Max

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16921#16921





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to