Dear All,

I'm just picking up osgShadow, and have a couple of questions that I would
appreciate some advice on. The intention is to use one of the ShadowMap type
methods.

Case1 : Shadow casters already have expensive fragment shaders

In the case where the objects that are casting shadows have expensive
fragment shaders, I would prefer to turn these shaders off so that we just
get a quick depth only pass. Fortunately my expensive shaders sit above the
object's scenegraph, and so I can envisage an approach in which my unshaded
object has two parent nodes (say A and B), which are both children of the
shadow node. A would have the castsShadow mask and a cheap shader, and B
would have the receivesShadow mask and the expensive shader.

Does this sound like an acceptable approach? I have read things about using
uniforms passed into the shader to control whether it is operating or not,
but the above seemed a little simpler. Does this already happen via the
shadow camera's use of GL_DEPTH

Case2 : Shadow receivers musn't be children of the shadow node.

For good architectural reasons, I can not place one of my desired shadow
receiving items underneath the shadow node. Hence I would like access to the
shadow texture, so that it can bind it explicitly. Would allowing the
ShadowTechnique classes to expose their RTT shadow texture so that something
else can also bind it be a problem in general? At the moment its protected.
Is this something worth submitting or should I just subclass/rewrite?

Case3 : Multitextured shadow receivers

I realise that multitextured items aren't really supported by the
out-of-the-box shadow techniques, but at the moment the handling of the
shadow texture units and "base" texture units seems a little clumsy, and
difficult to extend. Does anybody else have any experience of using shadows
with objects that are already multitextured (e.g. diffuse and normal
mapped)? It looks to me that if you have any other shaders knocking around
your scenegraph, you need to subclass ShadowTechnique to support your usage
model. Is that what people have done in the past?

Thanks,

David
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to