i think pd3ddev->clear() can be used in lite-c but the question is where to use it. how could i only use it for the depth buffers? doesn't render_sky get called for all rendering? can i access the current view there?
Great work, ventilator! I tried this back in the A6 times but couldn't get it to work because of the many workarounds it required then.
There are several shadowmapping techniques that are compatible with pssm. It's the group of warping techniques (pssm is a splitting technique). Some examples are PSM, LiSPSM, TSM, and some more. They're all based on using a different projection, so that the shadowmap space is used optimally.
Do your split-frustums fit tightly around their chunk of the normal view frustums?
you mean psm, lispsm, tsm,... additionally could be used for the single frustum splits?
what i do at the moment is to take the usual light projection matrix and then apply a cropping matrix for each frustum split. just like in pssm example from the link. so the split frustum gets scaled up to fit the size of the shadow map but i guess depending on perspective distortion there still can be quite some wasted resolution.
the problem is that you need one view per spotlight and up to 6 for point lights. now imagine how many views you'd have to render when your scene has 8 visible lights? of course you can optimize the process, e.g. via view clipping etc... but it will be slow.
Re: view frusta and shadow map
[Re: Joey]
#185627 03/01/0815:0403/01/0815:04
yes, 8 * 6 views would be a bit extreme. but the pssm example only uses 4 views. 3 could be enough too. i wouldn't need many more shadow casting lights for the outdoor scenes i have in mind for my projects.
Re: view frusta and shadow map
[Re: Joey]
#185628 03/01/0815:1303/01/0815:13
Yes, but PSSM is mainly usefull for shadowing large scenes with a directional (sun) light. Shadowmap aliasing increases as the light moves further from the shadowed objects, so PSSM is not needed for omnidrirectional lights (since they are mostly used in indoor scenes).
Using it only for the sun leaves you with 4 depthmap renders and one normal render. That's acceptable on modern hardware and gives you shadowing for the entire scene.
true. does anyone know a way of attaching more than 4 textures to a material so that we can make use of the 16 texture samplers of modern graphics hardware?
Re: view frusta and shadow map
[Re: Joey]
#185630 03/02/0813:5303/02/0813:53
i think this can be done with the LPD3DXEFFECT settexture() function but currently you have to do it with a plugin because the lite-c d3d9.h seems to be lacking the effect interface.