Originally Posted By: HeelX
You would have to write a special vp_pssm.fx and vp_depth.fx shader just for the trees. In detail, you need to bring the vertex transformation of the AnimTree.fx shader into the vertex shaders of the pssm fx files. You have to do this because the tree has to waive in the depth view, too, to cast the waived silhouette to the ground. And to reiceive it, of course wink

The tricky thing is to bring this kind of "pssm shaded tree waiving" logic as addition into <shadows.c>. There, the shaders are applied as view materials to each and every entity as far as I can see. You would have to write something like an interceptor - a view event - that switches the shaders dependent if it is a tree or not.


Thank you. But that's the things I already know. You gave an explenation why the shadow doesn't move with the trees. But I looking for an explenation how to bring the vertex transformation from the tree shader into the pssm shader.