------------------
Hello! I separate the dynamic and static objects like this:
Code: Select all
item->setVisibilityFlags( (node->isStatic()) ? 0x00000004 : 0x00000003 );
So I have a directional light with pssm shadows and a spotlight with focused shadows, the idea is to render dynamic objects only in the pssm shadows and static ones in the focused.
I do this to have better performance using a static shadow for my static objects, and it works just fine!... but only when pssm splits is 2 :S
if split count is 3 or 4 I get both shadows for the dynamic objects... its like if the VisibilityMask for the scene pass of the second shadow is taken from the first one =(
I am doing my shadow node stuffs by code but I was able to reproduce the problem using the ShadowMapDebuggingShadowNode from the samples in my workspace, I just added:
Code: Select all
.............
shadow_map_target_type directional
{
shadow_map 0 1 2 // 0 1
{
pass render_scene
{
visibility_mask 0x00000003
}
}
}
shadow_map_target_type directional spot
{
shadow_map 3 4 // 2 3
{
pass render_scene
{
visibility_mask 0x00000004
}
}
}
...........
any ideas?