Re: [osg-users] transparent geometry refuses to write to depth buffer

2013-03-11 Thread Sergey Polischuk
Hi if you are talking about fully transparent geometry (alpha = 0) - try to disable alpha test with setMode(GL_ALPHA_TEST, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE) 11.03.2013, 19:19, "Daniel Schmid" :Lets put it this way round: my pre-render camera has a depth and a color buffer. M

Re: [osg-users] transparent geometry refuses to write to depth buffer

2013-03-11 Thread Sebastian Messerschmidt
Hello Daniel, simply set: osg::Depth* depth= new osg::Depth(osg::Depth::LEQUAL, 0.0, 1.0, true); stateset->setAttributeAndModes(depth, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);; to your transparent pass/models last parameter to depth is depth-writes. I usually put those

[osg-users] transparent geometry refuses to write to depth buffer

2013-03-11 Thread Daniel Schmid
Lets put it this way round: my pre-render camera has a depth and a color buffer. My geometry has a vertex and fragment shader that fades the geometry using alpha. I have the desired result in my color buffer but my depth buffer remains empty. How can I force geometry to always write depth, no ma