Hi Robert,

osgShadow doesn't currently have an ShadowTechniques that support
multiple light sources, the closest to this is the
ViewDependentShadowMap with it's support for multiple shadow maps,
which currently is related to it's support of depth partitioning of
the shadow map, but I've had it in mind that this would be generalized
at a later date to support multiple light sources as well.   This
would require support in the shaders as well as the .cpp.

Have a look at how it's implemented.  You could implement your own
ShadowTechinque using a similar approach, or subclass from
ViewDependentShadowMap.  I wouldn't recommend the approach you are
suggesting though, using multiple ShadowedScene's would just
complicate implementation and usage.

Robert.

On 25 May 2015 at 02:26, Robert Graf <muzzlebu...@gmail.com> wrote:
> Howdy all,
>
> What is a way to have a ShadowedScene update just its shadow texture unit in 
> the pre-render for its children, and not have its children rendered during 
> the main viewer pass?
>
> I'd like to set up multiple lights, each with its own shadow map. Each 
> light/shadowmap combination will be a ShadowedScene. These ShadowedScene's 
> will be pre-rendered, each in their own shadow map texture unit. Then in the 
> main viewer pass, a custom fragment shader will use the different shadow map 
> texture units for shadowing. For the main viewer pass, only the regular scene 
> will be rendered, not any of the shadowed_scene's.
>
> The scene would look something like this:
>
> - root
> |--- shadowed_scene1
> |     |--- scene
> |--- shadowed_scene2
> |     |--- scene
> |--- shadowed_scene3
> |     |--- scene
> |--- scene
>
> Thanks!
> -Robert
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=63804#63804
>
>
>
>
>
> _______________________________________________
> 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