Sign in to follow this  
shaq1106

Unit Cube Clipping for LisPSM

Recommended Posts

Hi.
I'm reading about LisPSM and got some code
from nvidia.com
When apply unit cube clipping for LisPSM
the shadow quality is much better then before.

But I don't know what the code means.
I mean what the unit cube clipping means for LisPSM
and how to apply it for LisPSM.
There are other tech such as PSM,TSM.
But this time I want to focus on LisPSM first.

Thanks.

Share this post


Link to post
Share on other sites
imagine the light's pov

now instead of rendering from the light's pov (looking down z)
you use a lookat vector which is perpendicular to the light z vector
but with direction as close as possible to the view z vector

then after you calculate:

Pproj = mul(Pview, MworldViewProj)

you just swizzle it around

Pproj = Pproj.xzy; // for example

so you end up with linear z and non-linear x axis

Share this post


Link to post
Share on other sites
[quote name='shaq1106' timestamp='1292304228' post='590390']
Hi.
I'm reading about LisPSM and got some code
from nvidia.com
When apply unit cube clipping for LisPSM
the shadow quality is much better then before.

But I don't know what the code means.
I mean what the unit cube clipping means for LisPSM
and how to apply it for LisPSM.
There are other tech such as PSM,TSM.
But this time I want to focus on LisPSM first.

Thanks.


[/quote]

I think you will find that the y divide for this technique seriously damages the z precision of the shadowmap, and you will still be left dealing with the dueling frusta cases unless you have a locked POV (say an isometric camera for an RTS style game).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this