Hi David, J-S
As usual, Great thanks to J-S for doing my work ;-) But I would like to
clarify the blending issue you mentioned.
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?
If you're using the ViewDependentShadow techniques, they already disable
shaders while rendering the shadow pass. (note that they also disable
blending, which is a problem if you have objects which are solid but whose
textures give holes, like a chain link fence for example - the object's
shadow will look completely solid instead of showing the holes as it
should)
No, they won't be solid. As they are not solid in for trees drawn in island
scene. But you have to use alpha ref. On the other hand if your transparency
does not use alpha ref and sets Z-values it will still be solid even if
color buffer would end transparent. So I must admit I don't exactly
understand why turning blending may change depth values in shadow map. Maybe
its not blending but override on rendering bins ? I use only one bin to
render shadow map - is this the reason of your problems ?
Cheers,
Wojtek
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org