Hi Guys,
Nope, receivesShadowMask is generally ignored in ViewDependentShadows.
Exception in MinimaDrawBoundsShadowMap but there it is used only to
approximate shadow volume which is later additionaly refined.
Problem is that implementing receiveShadowMask without messing with
shaders/and uniforms during render traversals would probably require
splitting cull traversal into two traversals one for receiveShadowMask nodes
and one for those without it. Two cull traversals probably mean two sets of
render stages and possible issues with bin sorting.
I guess that alternatively one may use shadow shader and special uniform
which would activate shadow map for nodes with receiveShadowMask I suspose
thats what J-S did. And I think its ok when done explicitly by end user
programmer. But such approach on middleware/library level would probably
mean adding aditional uniforms and/or shaders into stategraph according to
node maks found while culling. I am not sure if this is fully acceptable and
risk free. This also means that shadow shader would be used for all nodes
even for those without receiveShadowMask. If one would expect that shadowing
would not touch any aspect of receiveShadowMask free nodes he could be
unpleseantly surprised as shaders usually make some shortcuts and sacrifice
some of fixed pipeline functionality.
In my opinion generic shadow algorthm which could be used without
modification with all types of database and types of aplication was not yet
found. And I would not try to make such algorithm. Anyone should expect that
if certain approach does not work for their case they need to either derive
their own shadow from exisiting classes or create their own solutions.
Cheers,
Wojtek
Hi Cedric,
I already notice this problem for my usage i fixed it (for the osg 2.6).
Check in the file as attachement for USE_RECEIVER_MASK
I recommand you to search in the mailing because we already talk about
that before, and it could give you more informations.
Was this submitted for inclusion into the baseline OSG? It looks like it
solves a long standing problem with ShadowMap (the receivesShadow mask
doesn't have any effect).
Although, as I said, there are already other ways to accomplish that.
And I may have been mistaken, it looks like the ViewDependentShadow
techniques use the receivesShadow mask as well. I've never checked if it
works, but I assume it does :-)
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
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