<div dir="ltr">Hi Laurens,<div><br></div><div>do you have experience with DEPTH32bit and shadowcomparation set to true - for shadow mapping?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 12:08 PM, Trajce Nikolov NICK <span dir="ltr"><<a href="mailto:trajce.nikolov.nick@gmail.com" target="_blank">trajce.nikolov.nick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px">Hi Voerman,</span></div><span style="font-size:12.8px"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Yes, </span><span style="font-size:12.8px">GL_DEPTH_</span><span style="font-size:12.8px">COMPONENT32 was what I was missing ... Thanks a lot!</span></div><div><span style="font-size:12.8px"><br></span></div><div>Trajce</div></span></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 9:25 AM, Voerman, L. <span dir="ltr"><<a href="mailto:l.voerman@rug.nl" target="_blank">l.voerman@rug.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Trajce,<div>maybe this sniplet helps?<br><div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer = new osg::Texture2D;</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_textureDepthBuffer->setTextur<wbr>eSize(_width+2.0f*_width*_<wbr>guardBandPercentage, _height+2.0f*_height*_guardBan<wbr>dPercentage);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>_textureDepthBuffer->setSource<wbr>Format(GL_DEPTH_COMPONENT); </div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_textureDepthBuffer->setIntern<wbr>alFormat(GL_DEPTH_COMPONENT32)<wbr>; </div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>_textureDepthBuffer->setFilter<wbr>(osg::Texture2D::MIN_FILTER,<wbr>osg::Texture2D::NEAREST);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>_textureDepthBuffer->setFilter<wbr>(osg::Texture2D::MAG_FILTER,<wbr>osg::Texture2D::NEAREST);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>_textureDepthBuffer->setShadow<wbr>Comparison(false);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>_textureDepthBuffer->setWrap(o<wbr>sg::Texture::WRAP_R,osg::Textu<wbr>re::CLAMP_TO_EDGE);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>_textureDepthBuffer->setWrap(o<wbr>sg::Texture::WRAP_S,osg::Textu<wbr>re::CLAMP_TO_EDGE);</div><div><br></div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>// camera </div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>_colorDepthCamera = new osg::Camera;</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>_colorDepthCamera->setStats(ne<wbr>w osg::Stats("Camera"));</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>_colorDepthCamera->setName("co<wbr>lorDepth");</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_colorDepthCamera->setClearMas<wbr>k(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_colorDepthCamera->setReferenc<wbr>eFrame(osg::Transform::<wbr>RELATIVE_RF);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>// set viewport</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera->setViewport<wbr>(0,0,_width+2.0f*_width*_<wbr>guardBandPercentage,_height+2.<wbr>0f*_height*_guardBandPercentag<wbr>e);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>_colorDepthCamera->setRenderOr<wbr>der(osg::Camera::PRE_RENDER,0)<wbr>;</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>_colorDepthCamera->setRenderTa<wbr>rgetImplementation(osg::<wbr>Camera::FRAME_BUFFER_OBJECT);</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>_colorDepthCamera->attach(osg:<wbr>:Camera::DEPTH_BUFFER, _textureDepthBuffer.get(),0,0,<wbr>false,0,0); // depth</div><div><span class="m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>_colorDepthCamera->attach(osg:<wbr>:Camera::COLOR_BUFFER, _textureColorBuffer.get(),0,0,<wbr>false,_msaa,_msaa); // color</div></div><div>regards, Laurens.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_4561283674951535366h5">On Wed, Oct 19, 2016 at 11:15 PM, Trajce Nikolov NICK <span dir="ltr"><<a href="mailto:trajce.nikolov.nick@gmail.com" target="_blank">trajce.nikolov.nick@gmail.com</a><wbr>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_4561283674951535366h5"><div dir="ltr">Hi Community,<div><br></div><div>anyone with clue how to set RTT osg::Texture with 32bit DEPTH?</div><div><br></div><div>Thanks a bunch as always!</div><div>Cheers,</div><div>Nick<span class="m_4561283674951535366m_3475550486276027419HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_4561283674951535366m_3475550486276027419m_-382122667145903556gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></div></div>
<br></div></div>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_4561283674951535366gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>