<div dir="ltr"><div>Hi,</div><div><br></div><div>I have an issue with clipping planes, if you set 2 different 
clipping planes to 2 different objects, only the last clipping plane is used. I was expecting each object to be drawn with its clipping plane.<br></div><div><br></div><div>osg::ref_ptr<osg::ClipNode> clipNode1 = new osg::ClipNode;<br>              clipNode1->addClipPlane(new osg::ClipPlane(0));<br>            clipNode1->getClipPlane(0)->setClipPlane(1.0, 0.0, 0.0, -2000.0);<br><br>             osg::ref_ptr<osg::ClipNode> clipNode2 = new osg::ClipNode;<br>              clipNode2->addClipPlane(new osg::ClipPlane(0));<br>            clipNode2->getClipPlane(0)->setClipPlane(-1.0, 0.0, 0.0, -2000.0);<br><br>            osg::ShapeDrawable* s1 = new osg::ShapeDrawable(new osg::Box(osg::Vec3(2000, 0, 0), 500));<br>            clipNode1->addChild(s1);<br>           osg::ShapeDrawable* s2 = new osg::ShapeDrawable(new osg::Box(osg::Vec3(-2000, 0, 0), 500));<br>           clipNode2->addChild(s2);</div><div><br></div><div>Every box is shown in half because of the clipping plane.<br></div><div><br></div><div><b>Case 1</b><br></div><div>root->addChild(clipNode1);<br>//root->addChild(clipNode2);</div><div><br></div><div><div><img src="cid:ii_k235elal0" alt="image.png" width="411" height="273"></div><div><br></div><div>
<div><b>Case 2</b><br></div><div>//root->addChild(clipNode1);<br>root->addChild(clipNode2);</div><div><br></div><div><div><img src="cid:ii_k235g3v51" alt="image.png" width="412" height="277"></div><div><br></div><div>
<div><b>Case 3</b><br></div><div>root->addChild(clipNode1);<br>root->addChild(clipNode2);</div><div><br></div><div><div><img src="cid:ii_k235hcol2" alt="image.png" width="414" height="275"></div><div><br></div><div>I was expecting both boxes, S1 and S2 to be drawn.<br></div><div><br></div></div>

</div></div>

</div></div></div>