I've decided to assign colors to different shadowTexCoord.z values. That's my final pass fragment shader now: http://goo.gl/n6FrVB Turns out shadowTexCoord.z is in the range (-51.85;-50.80) for the scene for some reason. And, as you see from this video: http://youtu.be/_NQLCXYveHYshadowTexCoord.z values change when I move main camera. I don't know how to interpret this. Any idea? Thanks.
2013/10/14 michael kapelko <[email protected]> > Hi. > My shadow pass fragment shader looks like this: http://goo.gl/R5r7Z1 > So all xyzw contain the depth fragment. I tried .x too. > My current problem is in interpreting shadowTexCoord.z > The shadow projection matrix setup is: http://goo.gl/ly2u7F > Does that mean my shadowTexCoord.z should be in the range [1; 100]? Or > [-1;1]? > Thanks. > > > 2013/10/14 Marcel Pursche <[email protected]> > >> Hi, >> >> you write the depth in your first texture component(accessed from the >> shader with .r, .x or .s). But you read it from the third component of >> your texture(.z). I know it looks confusing at first to read the depth from >> .x, but this is actually right. >> >> Thank you! >> >> Cheers, >> Marcel >> >> ------------------ >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=56770#56770 >> >> >> >> >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

