Hi!

Hmmm... I haven't looked at "ViewDependentShadow" so far.
I'm a little confused now.
How are things workingh together?
I have a ShadowScene and set the ShaderTechnique with my own class derived 
from SoftShadowMap.
I wrote virtual methods for createShaders and createUniforms for support of my 
shaders.
ShaderTechnique is having its shaders and now I see ViewDependentShadow is 
also having a different set of shaders. When is ViewDependentShadow coming 
into the game?

Many ???? :-(

Can anyone give me some explanation please?

Thanks in advance

- Werner - 

Am Donnerstag, 9. Dezember 2010, 15:18:15 schrieb Jean-Sébastien Guay:
> Hello Werner,
> 
> > Actually I'd like to be more flexible in the use of the ShaderTechnic and
> > I ask myself if it is possible to use the standard ShadowTechnics and
> > attach my Shaders to my user scene child somehow.
> 
> There is no problem with this, we do it ourselves.
> 
> The only thing to be aware of is that anytime you have a shader on a
> child node somewhere in your graph, if you want it to have shadows then
> you need to use the same shadow mapping code as the ShadowTechnique's
> shaders. So it may be easier to do as the ViewDependentShadow classes
> do: separate the main shader and the shadow shader (for both stages,
> vertex and fragment), and just have some function in your code that when
> creating a new osg::Program, will add the user's shaders plus the shadow
> shaders. The user's shaders would just have to call the function(s)
> defined in the shadow shaders at the appropriate time.
> 
> Otherwise you can of course copy-paste the shadow shader code into your
> own shaders instead, but that is error-prone and if you decide you want
> to change something (like filter the shadows, or whatever) you have to
> change it in many places.
> 
> Hope this helps,
> 
> J-S
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to