Hi David,
Btw. Shadow shaders are extremaly simple. Vertex shader simply performs texgen
operation on stage 1 to produce shadow tex coords. Fragment shader simply
performs texture from shadow map. So generally you may even hardcode these
operation into your main shaders.
In my company we use some sort of poor man virtualization of OSG GLSL program.
At the top of hierarchy we use dummy Shadow shaders which implement nullop
DynamicShader (vertex does nothing, fragment returns 1.0 as shadow term) . When
Shadowing kicks in these, Shadow shaders are substituted with StandardShadowMap
shaders and programs are automatilly rebuilt. That way we can fairly easily
activate/ deactivate Shadowing based on user request.
Cheers,
Wojtek
----- Original Message -----
From: David Spilling
To: OpenSceneGraph Users
Sent: Friday, October 24, 2008 2:59 PM
Subject: Re: [osg-users] Advice on interacting with osgShadow
Wojtek,
Just grab them from StandardShadowMap via getShadowVertexShader() &
getShadowFragmentShader().
Ah. I missed that. Perils of browsing source via the website, I guess...
Thanks,
David
------------------------------------------------------------------------------
_______________________________________________
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