Re: [osg-users] multipass transparency

2012-10-10 Thread Sergey Polischuk
Hi For such complex transparent models you need some proper order-independent transparency algorithm Cheers. 09.10.2012, 23:22, "Tina Guo" : > Hi, > > Thanks for reply. Now the code is like > > virtual void define_passes() > { > osg::ref_ptr ss = new osg::StateSet; > ss->set

Re: [osg-users] multipass transparency

2012-10-09 Thread Tina Guo
Hi, Thanks for reply. Now the code is like virtual void define_passes() { osg::ref_ptr ss = new osg::StateSet; ss->setAttributeAndModes( new osg::ColorMask(true, true, true, true) ); osg::Depth* depth = new osg::Depth; depth->setWriteMask( false

Re: [osg-users] multipass transparency

2012-10-09 Thread Sergey Polischuk
Hi If you need to blend all visible layers - try to change order of passes, and set colormask to all false's (so first will be only color, second only depth). If you dont need depth from transparent geometry - you can get by with only first pass. If you need only closest single layer - you draw

[osg-users] multipass transparency

2012-10-08 Thread Tina Guo
Hi, In open inventor, there is a transparency mode called: delayed blend Transparent objects are rendered using multiplicative alpha blending, in a second rendering pass with depth buffer updates disabled. And I want to get the same effect. here's what I am trying to do transparency->