Newsgroup: it.comp.giochi.action
Titolo: Default  Variance Shadow Maps Demo (D3D10)

è ot ma può interessare
 A summary of the available techniques:
  a.. Normal ugly shadow maps.
  b.. Hardware accelerated percentage-closer filtering.
  c.. Variance shadow maps with trilinear/anisotropic filtering, and 
blurring to clamp minimum filter width. Also supports multisampling.
  d.. Summed-area variance shadow maps as described in the previous thread, 
except now with support for multisampling, as well as both an fp32 and int32 
implementation.
  e.. Parallel-split variance shadow maps, which help magnification as well.
Shadow MSAA makes a *huge* difference in motion (use "animate light" 
checkbox). It really has to be seen to be believed, but even for really 
large minimum filter widths, swimming is still somewhat visible without 
MSAA. With even 4x MSAA swimming is drastically reduced or eliminated.
int32 is also really awesome for summed-area tables, and is the preferred 
implementation. Two things make this the case: the extra bits of precision 
over fp32, and the overflow behavior in D3D10. The latter works because 
overflow is wrapped in D3D10 which means that we only need to waste W*H bits 
of the SAT for accumulation where WxH are the dimensions of the maximum 
filter width. This maximum filter width can be bounded fairly conservatively 
(ex. 64x64 is plenty - probably overkill for most implementations). The 
results of int32 make numeric precision a non-issue again, and save a ton of 
memory bandwidth since there's no need to distribute precision into 4 
components.
Parallel-split variance shadow maps are also really cool, especially with 
the new, larger "convoy" scene. Three 512x512 variance shadow map splits 
with 4x MSAA and a bit of blurring looks fantastic and has excellent 
performance, and the quality can go up from there if necessary. Note that 
this implementation is relatively unoptimized; it's more of a "proof of 
concept". In particular, the shadow split locations could be chosen a lot 
more sensibly, and even some basic frustum culling would greatly improve the 
performance of rendering the different shadow map splits.
There's a few details that come up with PSVSM that I thought you guys may be 
interested in as well. Feel free to skip over the next few paragraphs if 
not.
First to get consistent blurring over the different shadow splits one needs 
to scale the blur kernel size by the ratio of texel sizes between the 
current split and the full shadow frustum. This is fairly easy to do and 
very nicely hides the split locations as well, even in motion (see 
screenshots below). Note that in this demo I round the scaled filter widths 
to the nearest integer for simplicity; quality could certainly be improved 
further by allowing non-integer blur kernels.
The second detail is the "fun" one: the splits are rendered into a texture 
array and the applicable split is computed in the fragment shader when 
shading the scene. This split index is used to choose the appropriate 
projection matrix and texture array element. This poses a problem, however, 
for computing texture coordinate derivatives and LOD, since different pixels 
in the same quad may choose different slices, resulting in unrelated texture 
coordinates and nonsensical derivatives/LOD. Other implementations have not 
noticed this problem because without variance shadow maps (and proper shadow 
filtering), there *is* no LOD computation as things are at best bilinearly 
sampled.
To solve this problem we really want to arbitrarily choose one of the two 
split indices and make sure they are consistent across the quad (note that 
I'm assuming only two split indices in a quad, but this turns out to be 
completely reasonable). After some head scratching I came up with the 
following code:
bla bla
http://forum.beyond3d.com/showthread.php?t=40805
 

 
http://forum.beyond3d.com/showthread.php?t=40805
dai PdG, č roba per te :D
-- 
-------------------------------
SimBus82 --> 
www.simbus82.altervista.org
 --> Hi-Tech Content Inside
-------------------------------

 č ot ma puň interessare
Molto interessante. Tra qualche ora rientro a casa e lo provo subito!
-- 
Don't break, don't break my heart,
and I won't break your heart shaped glasses. 

 Molto interessante. Tra qualche ora rientro a casa e lo provo subito!
Provato, e' molto veloce ma e' orribile in movimento.


 Provato, e' molto veloce ma e' orribile in movimento.
Hai provato a prenderlo letteralmente in ass?
ti conviene.
cosě completi la tua collezione.
tol
w ageia
-- 
questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news
 segnala gli abusi ad 
ab...@newsland.it

 cosě completi la tua collezione.
chi e' amico di fava non puo' essere amico di pricoca.
