<div dir="ltr">Hi readers to this thread ;-),<div><br></div><div>I am close to resolve this but the math involved is a bit tricky for me to understand it right. And suddenly I can not send screenshots or videos publicly - maybe on private email to those willing to help.</div><div><br></div><div>The story now is this:</div><div><br></div><div>The environment is ECEF terrain, and I have light source. I am rendering to texture from this light source position/direction into a depth texture. The light matrix is computed now in view space, and is used against the view vertex in pixel shader, where the shadow projection is done. It gives non-flickering results, which is very good however the texture coords are wrong, and the missing part for me is the coorect texture coords computation from lightmatrix and vertex in view space.</div><div><br></div><div>Any help is very appreciated !!!</div><div><br></div><div>And thanks</div><div><br></div><div>Nick</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 7:13 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">almost there .. the flickering is gone, just the shadow texture lookup coordinates are messed up when used view space matrix and vertex.<div><br></div><div>This is the code for constructing the final matrix:</div><div><br></div><div><div> osg::Matrixf lmvpm =</div><div><span class="m_7384451911886186144gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>lightMatrixInViewSpace * osg::Matrixf(camera-><wbr>getProjectionMatrix()) *</div><div> osg::Matrixf::translate(1, 1, 1) * osg::Matrixf::scale(0.5, 0.5, 0.5);</div></div><div><br></div><div>and the GLSL:</div><div><br></div><div><div>vec4 projShadow = light.lmvpMatrix * vVertexView;</div><div><br></div><div> vec4 uvzw;</div><div> uvzw.xyw = projShadow.xyz;</div><div> uvzw.z = light.occlusionLayer-1;</div><div> float factor = texture( lightOcclusionTextureArray, uvzw );</div><div><br></div><div> fDiffuseColor *= factor;</div></div><div><br></div><div>if you spot anything ...</div><div><br></div><div>Thanks so much Glenn!</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 6:52 PM, Glenn Waldron <span dir="ltr"><<a href="mailto:gwaldron@gmail.com" target="_blank">gwaldron@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">Up vector doesn't really matter, so just pick one like:<div><br><div>side = cross(view_vec, (0,0,1));</div><div>up = cross(side, view_vec);</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_7384451911886186144m_4306462101174065920gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Glenn Waldron</div></div></div></div><div><div class="m_7384451911886186144h5">
<br><div class="gmail_quote">On Thu, Oct 20, 2016 at 12:00 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Just last question .. What the 'up' vector would be now for making the light matrix in view space?</div><div class="gmail_extra"><div><div class="m_7384451911886186144m_4306462101174065920h5"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 5:39 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Glenn,<div><br></div><div>this worked ... :-) ... Thanks for the hint ... </div></div><div class="gmail_extra"><div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160h5"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 5:02 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">wops ..<div><br></div><div><span style="font-size:12.8px">mx.makeLookAt(</span><span style="font-size:12.8px">lightPosInViewSp<wbr>ace,</span><span style="font-size:12.8px">lightPosInViewSpace+</span><span style="font-size:12.8px">lightD<wbr>irInViewSpace</span><span style="font-size:12.8px">,up)</span><br></div></div><div class="gmail_extra"><div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531h5"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 5:00 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Glenn,<div><br></div><div>actually I was expecting this. I have the math to get the light direction in view space, just the construction of the light matrix in view space hurts my head a bit ( I missed that part of the class :-) )</div><div><br></div><div>vec3 lightDirInViewSpace;</div><div>vec3 lightPosInViewSpace;<br>mx.makeLookAt(lightPosInViewSp<wbr>ace,lightPosInViewSpace+lightP<wbr>osInViewSpace,up)<br><br>Something like this?</div></div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686HOEnZb"><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 4:04 PM, Glenn Waldron <span dir="ltr"><<a href="mailto:gwaldron@gmail.com" target="_blank">gwaldron@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">There's your precision loss, you can't do that with ECEF coordinates or they will be truncated.<div><br></div><div>Better idea: build your light matrix in view space on the CPU (instead of world space), and then use it on the view-space vertex in the shader. (You'll have to update it every time the camera moves, of course.)</div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823HOEnZb"><font color="#888888"><div><br></div></font></span></div><div class="gmail_extra"><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Glenn Waldron</div></div></div></div></font></span><div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823h5">
<br><div class="gmail_quote">On Thu, Oct 20, 2016 at 10:00 AM, 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Glenn,<div><br></div><div><div>vec3 vVertex = vec3(gl_ModelViewMatrix * VertexMODEL);</div><div>worldSpaceVertex = osg_ViewMatrixInverse * vec4( vVertex, 1.0 );</div></div><div><br></div><div>Part of VP</div></div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176HOEnZb"><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 3:52 PM, Glenn Waldron <span dir="ltr"><<a href="mailto:gwaldron@gmail.com" target="_blank">gwaldron@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">Nick, how did you calculate "worldSpaceVertex"?</div><div class="gmail_extra"><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Glenn Waldron</div></div></div></div></font></span><div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879h5">
<br><div class="gmail_quote">On Thu, Oct 20, 2016 at 9:13 AM, 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">hehe .. ok :-) .. Maybe you give me a hint.<div><br></div><div>I have F+ lighting (written by a friend of mine) and I have extended it so local lights cast shadows (a bit of complex code - relatively actually, but for me it is ;-) ). Works well for flat terrains with reasonable sizes. I am trying to make it work with ECEF terrain (for testing I use osgearth). The debug code works just fine, I am seeing the renderings from the local lights are correct, so the light view matrix passed to the shader is correct, but getting z-fights with setInternalFormat(GL_DEPTH_COM<wbr>PONENT); only. Here is my setup for the RTT (it is texturearray):</div><div><br></div><div><a href="http://pastebin.com/Nnc2iA1F" target="_blank">http://pastebin.com/Nnc2iA1F</a><br></div><div><br></div><div>With DEPTH32bit (really naive approach, I "was" thinking fast the increase of the DEPTH precision will solve this issue, just recently started with reading papers and I must admit I am not a "shadowing expert").</div><div><br></div><div>Further, I am calculating the Light View Matrix and passing it to the shader - this one is correct as well, since I am seeing the light in the scene with the z artifacts as I mentioned .... and this is my GLSL snippet:</div><div><br></div><div><a href="http://pastebin.com/r2W0gh0L" target="_blank">http://pastebin.com/r2W0gh0L</a><br></div><div><br></div><div>I am trying to get it done as simple as is ... meanwhile found this:</div><div><br></div><div><a href="http://developer.download.nvidia.com/SDK/10/direct3d/Source/VarianceShadowMapping/Doc/VarianceShadowMapping.pdf" target="_blank">http://developer.download.nvid<wbr>ia.com/SDK/10/direct3d/Source/<wbr>VarianceShadowMapping/Doc/Vari<wbr>anceShadowMapping.pdf</a></div><div><br></div><div>that looks promising and apparently should help with the Z issues.</div><div><br></div><div>This is my story for now, any hints are highly appreciated !!!!!</div><div><br></div><div>And thanks a bunch for so far!</div><div><br></div><div>Cheers,</div></div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335HOEnZb"><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 2:56 PM, 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">yes? <div>we use a variation on OpenSceneGraph\src\osgShadow\P<wbr>arallelSplitShadowMap.cpp <div>regards, Laurens.</div></div></div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505HOEnZb"><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 2:35 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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"><div><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671h5"><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><wbr>></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="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331h5"><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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer = new osg::Texture2D;</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer->setTextur<wbr>eSize(_width+2.0f*_width*_guar<wbr>dBandPercentage, _height+2.0f*_height*_guardBan<wbr>dPercentage);</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer->setSource<wbr>Format(GL_DEPTH_COMPONENT); </div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer->setIntern<wbr>alFormat(GL_DEPTH_COMPONENT32)<wbr>; </div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer->setFilter<wbr>(osg::Texture2D::MIN_FILTER,os<wbr>g::Texture2D::NEAREST);</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer->setFilter<wbr>(osg::Texture2D::MAG_FILTER,os<wbr>g::Texture2D::NEAREST);</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer->setShadow<wbr>Comparison(false);</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>// camera </div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera = new osg::Camera;</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera->setStats(ne<wbr>w osg::Stats("Camera"));</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera->setName("co<wbr>lorDepth");</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera->setReferenc<wbr>eFrame(osg::Transform::RELATIV<wbr>E_RF);</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>// set viewport</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera->setViewport<wbr>(0,0,_width+2.0f*_width*_guard<wbr>BandPercentage,_height+2.0f*_h<wbr>eight*_guardBandPercentage);</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera->setRenderTa<wbr>rgetImplementation(osg::Camera<wbr>::FRAME_BUFFER_OBJECT);</div><div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366m_3475550486276027419HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_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="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331HOEnZb"><font color="#888888">-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331m_4561283674951535366gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671HOEnZb"><font color="#888888">-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505m_6260305910235327671m_-5858794570746803331gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></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></div>
</div></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>-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879m_-4579563254622402335m_-379995332325707505gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>
</div></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></div></div></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>-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823m_-6272061857510783176m_4427849653745974879gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>
</div></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></div></div></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>-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686m_5187404698063731823gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531HOEnZb"><font color="#888888">-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531m_2304077458594349686gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_7384451911886186144m_4306462101174065920m_4267231584023659160HOEnZb"><font color="#888888">-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160m_5256746626090827531gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_7384451911886186144m_4306462101174065920HOEnZb"><font color="#888888">-- <br><div class="m_7384451911886186144m_4306462101174065920m_4267231584023659160gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></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></div></div></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>-- <br><div class="m_7384451911886186144gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>
</div></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>