Hi,

These lines limit the textures used for rendering shadow map. Basically
there is no need to render the models with textures when we only render
depth in shadow map. The only exception are textures which can contain
alpha and then models will not render the parts with full transparency. So
the lines there turn of all textures (maybe it should be exceeded to max
number of stages available) except stage 0 where base texture with alpha is
assumed to be. This should be no problem for models with more texture
stages as long as you substitute shadow technique shaders with your own set
which can process your multiple textures correctly.

Cheers,
Wojtek Lewandowski

2012/3/20 Daniel Schmid <daniel.sch...@swiss-simtec.ch>

> There is a remaining question. In StandardShadowMap.cpp Lines 632 - 639
> (osg 3.0.1) I find lines setting the texture mode for stage 1-4. Why is
> there a limitation to these 4 stages, and what are they doing? If my model
> uses 4 textures and the shadow should go on layer 5, could this be a
> problem?
>
>
> -----Ursprüngliche Nachricht-----
> Von: osg-users-boun...@lists.openscenegraph.org [mailto:
> osg-users-boun...@lists.openscenegraph.org] Im Auftrag von Robert Osfield
> Gesendet: Dienstag, 20. März 2012 09:48
> An: OpenSceneGraph Users
> Betreff: Re: [osg-users] osgShadow and multitexture
>
> Hi Daniel,
>
> On 20 March 2012 08:26, Daniel Schmid <daniel.sch...@swiss-simtec.ch>
> wrote:
> > I have a hard time understanding that the osgShadow implementations
> > should support multitexturing when they never mix the colors oft he
> > different texture units. Ok, I'm not yet that settled in glsl maybe
> > there is some magic working behind, which I do not understand.
> >
> > I'm having a closer look right now into StandardShadowMap. There is
> > only the base texture rendered (which I can define by setter method),
> > plus the shadow texture. The other textures are ignored. When I want
> > to use multiple texture layers, I ALWAYS have to write my own shaders.
> Is this correct ?
>
> Since the fixed function pipeline can't do shadows natively you have to
> write your own shaders.
>
> I have plans to get shader composition for the OSG which would be able to
> replace the fixed function pipeline with shaders, but it'll be a while
> before I get the time to return to tackling this particular task.  Once we
> have shader composition should be easier to support dropping provided more
> flexible shadow support, but shader composition is far from trivial, very
> much at the cutting edge of scene graphs.
>
> Until then you'll need to write your own shaders, but this is pretty
> standard practice these days, often developers will do everything with
> shaders.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to