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: [email protected] 
[mailto:[email protected]] 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 <[email protected]> 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
[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

Reply via email to