Dual Paraboloid Shadow Mapping + Deferred Rendering

This topic is 2601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I am trying to modify this sample/tutorial code which demonstrates a simple light pre pass deferred lighting setup, so that point lights have shadows.

I am trying to implement dual paraboloid shadows, and I'm following this:

The problem is that J. Coluna does lighting in camera view space, but the DPM paper finds the shadow map position by transforming a light pixel from world space into light space.. I think. This is partly because the DPM paper assumes that forward rendering is used.

See how J. Coluna's deferred shadows are done with a spot light here:
http://olhovsky.com/...ng/SpotLight.fx

I don't have the world space position of the pixel, so I'm not sure how to find the tex coords to sample from in the shadow map.
Here's what I'm currently doing with point lights:
http://olhovsky.com/...g/PointLight.fx

So what I can do, is reconstruct the world space position of the pixel, and then just find the sampling position in the shadow map -- I think that makes sense?

However, I'm wondering if I actually *need* to bother with the world space position of the pixel? J. Coluna seems to have no trouble sampling shadow maps for a spot light without using the world position of the pixel, so it seems that I shouldn't need it for a point light.

While I'm currently enrolled in a linear algebra course, and I'm working on understanding this math in more complete way, I was hoping that someone could help me with this in the meantime, so that I can make a meaningful contribution to this project.

Thanks in advance for any assistance!

P.S.:
I tried making a thread the other day about this issue, but I don't think that I was very concise, so I'm trying again, this time reducing the problem as much as I can. Hopefully this isn't viewed as a repost, as the question has been framed very differently

P.P.S:
If you'd like to try to help figure this out but need to see what is going on, just let me know and I can send you a copy of this project. (It uses XNA/C#).

Share on other sites
In your deferred renderer I assume that you are able to reconstruct your view space pixel position? With this information, you'll be able to get the world space position by multiplying the view space position with inverse view matrix.

Practically, if you need a position in any light space, just create a single matrix that transforms the point to the world space (inverted view matrix) and then to the light space (inverted light matrix). You can transform your position directly from view space to any other space. World space is the common space for your lights and cameras so for that reason you'll probably need to make it part of your calculations.

Cheers!

Share on other sites
Thanks for the assist Kauna

It actually turned out that my WorldViewProjection matrix was missing the world multiply in the creation of the shadow maps.

So all of the code I posted actually works! (as long as you set all of the matricies to the correct values )

1. 1
Rutin
25
2. 2
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 14
• 11
• 11
• 9
• Forum Statistics

• Total Topics
631757
• Total Posts
3002131
×