Hi, I have some trouble with shadow casting for screen aligned billboards. The problem is that billboards don’t get the correct rotation for the shadow casting pass, from the shadows casted on the terrain it seems that the billboards has the same rotation for the shadow camera as applied by the regular camera.
The shadow technique in use is ViewDependentShadowMap with 2 shadow maps per light. The billboards technique used is a shader-based method where I basically reset the rotation part of the gl_ModelViewMatrix. Is there a reason for this technique to fail while used for the shadow camera? This is the rotation part of the billboard shader that don’t work as excepted during shadow casting pass: mat4 modelView = gl_ModelViewMatrix; modelView[0][0] = scale.x; modelView[0][1] = 0.0; modelView[0][2] = 0.0; modelView[1][0] = 0; modelView[1][1] = scale.y; modelView[1][2] = 0.0; gl_Position = gl_ProjectionMatrix * (modelView * gl_Vertex); Thank you! Cheers, Johan ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62310#62310
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

