VSM, the expensive shader

Started by
24 comments, last by AndyTX 15 years, 5 months ago
Quote:I would hope so, but one light source <=> one "shadow source" in my books :)

I alpha blend shadow results in a shadow mask / shadow collector. What is in there are cloud, character, environment shadows and a couple of others. Also from different light sources :-) ... this texture holds grey values that are the result of the shadow calculation.

Advertisement
Quote:Original post by wolf
I alpha blend shadow results in a shadow mask / shadow collector. What is in there are cloud, character, environment shadows and a couple of others. Also from different light sources :-) ... this texture holds grey values that are the result of the shadow calculation.

Wow, so how do you deal with something as simple as coloured lights and their associated partially overlapping shadows? Your approach would seem to fundamentally munge together independent terms in a way that prevents you from getting any sort of reasonable solution here...

But alas, if people are still irrationally scared of the only thing that the rendering equation really does say - namely that incoming light contributions are summed - then I guess you get into these sorts of oddities ;)

In any case, back on topic, deferred rendering allows you to lower the memory footprint by reorganizing the rendering loop; in this case, one can reorganize by the dependency of a given shadow map so that it only needs to be "alive" while computing illumination for the single relevant light, or even the single cascade or cube map face of a light.

[Edited by - AndyTX on October 18, 2008 1:10:33 AM]
Quote:Original post by wolf
I alpha blend shadow results in a shadow mask / shadow collector. What is in there are cloud, character, environment shadows and a couple of others. Also from different light sources :-) ... this texture holds grey values that are the result of the shadow calculation.


I agree with Andy.. this doesnt make a lot of sense to me...unless you use one channel per light source.. obviously for sun shadows you can merge eveyrthing together like that, but not for other light sources...? Unless you dont mix shadow-casting lights very often.. then you can get away with it.

Thanx for Ur solutions, problem is solved:)
We do something that is similar (I think) to what wolf was describing. Colored lights still work, because we just store the computed shadow information for each light source (one shadow-casting source / channel). During our lighting pass we can then still sum the contribution from each light source but use the pre-computed shadow information to modulate contribution.

Edit: Huh, on second reading it does sound like wolf's solution combines contributions from multiple sources. So I guess that's more aggressive than what we're doing...
Quote:Original post by osmanb
We do something that is similar (I think) to what wolf was describing. Colored lights still work, because we just store the computed shadow information for each light source (one shadow-casting source / channel). During our lighting pass we can then still sum the contribution from each light source but use the pre-computed shadow information to modulate contribution.

Yeah for sure that's reasonable if you're storing the shadowing terms separately... it was the blending shadow masks from different lights that is weird/wrong. :)

This topic is closed to new replies.

Advertisement