[osg-users] How to apply shadows to a scene with different shaders - Part 2

Michael Guerrero mjguerre at nps.edu
Wed Sep 17 15:28:38 PDT 2008

Hi guys, I followed this excellent thread
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/31360 with much
success.  I was able to mimic texgen in the vertex shader and get shadows
applied in the frag shader.  However, the quality doesn't match what you get
with ShadowMap using fixed function vertex processing and I believe I can see
where it's coming from.  In ShadowMap.cpp there exists the macro constant
"IMPROVE_TEXGEN_PRECISION".  What I have in the shader doesn't take this
enhancement into account.  Anyone know how this can be done?

Michael Guerrero

More information about the osg-users mailing list