Shadow mapping help

Started by
15 comments, last by solinent 15 years, 5 months ago
Ok, with variance shadow mapping:
Click

without:
Click

What's going on? Relevant code is within those images.

When I turn on filtering, then I get these ugly staircase patterns.

Ok, I am looking at your fx composer code, and you have this:

float lit_factor = (rescaled_dist_to_light <= moments.x);

What does this do? Doesn't that assign a float to a bool? Or does that assign 1.0 or 0.0 depending on the value of the bool?

[Edited by - solinent on November 16, 2008 12:51:55 PM]
Advertisement
Quote:
Ok, with variance shadow mapping:
Click

Don't know whats going on but one advice - when testing shadows always check how it looks with standard dot(L, N) shading :)

Quote:
Cool! It's a good school :)

Wish I could be there but it's about one-half equator's distance from my home :P
Yeah, there was a problem with how I was computing the shading, and it's almost fixed now (still some weird artifacts on the car, but I'll fix them later).

I'm trying to do a gaussian blur, but it seems that the algorithm isn't as easy as I thought it'd be, so I guess I'll be doing it another day. But I can apply custom glsl filters to my shadow maps now, and applying filters is doing something, so I think I'll eventually get it.
Quote:
I'm trying to do a gaussian blur, but it seems that the algorithm isn't as easy as I thought it'd be

Yeah, I guess blurring is the most time-consuming part of this algorithm. However, even though it is much more efficient than PCF. Besides, a really good-looking sun shadows are worth that :)
Just updating my progress: I got VSM to work nicely, and gaussian blur works as well!

I think I might just put off PSSM until I can get my hands on a nice race-track environment or make one of my own, because there's no point until then.

edit

I think I know why I have weird artifacts on my stuff, it's a precision problem.

For the brief second before my simulator blows up (due to large rendering times: I'm perplexed) when I use RGBA16, the artifacts go away.

But why is RGBA16 so slow? RGBA12 doesn't seem to make any improvement.

[Edited by - solinent on November 17, 2008 8:35:58 PM]
Quote:
Just updating my progress: I got VSM to work nicely, and gaussian blur works as well!

How about light-bleeding? Did you use any helper technique to avoid this problem?
My environment so far only consists of one object, and I haven't implemented PSSM (right now the light's position and direction is calculated at an offset to the car based on the drection of the light).

I'll probably get light bleeding when I add more things, but I'll cross that bridge when it comes.

Or will it help the precision issues I'm having?

This topic is closed to new replies.

Advertisement