Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
wsection shadows soft shadows step mul

Wsection shadows soft shadows step mul

570

Section V — Shadows
Soft Shadows

; declare the inflation vector
dcl normal0 v4

; jitter light position in r1
mul r1, v4, c3.x
sub r1, c20, r1

; jitter the light
mul r1, v4, c3.x
sub r1, c20, r1

; step 1: calculate M
sub r8, v0, r1

; step 3: G = D * M'
mul r8, r8, c1.x

; step 4: G' = E * G
mul r8, r8, v3.x

The initialization step of the blurring algorithm starts by rendering the inner vol-ume to the red component of the shadow map and the outer volume to the green component of the shadow map. As the result of the shadow volumes algorithm can be seen as a boolean (inside shadow or outside shadow), we encode it as a color component with a value of 0 when the pixel is outside the shadow or a value of 1 (or 255) when the pixel is inside the shadow. Since there are two volumes (inner and outer), there are four possible combinations. One of them is actually not possible (full red, no green), since the outer shadow completely covers the inner shadow. Three combinations remain, as seen in Figure 14.

� No red, no green: both outside inner and outer shadows; pixel receives 100% of the light

Figure 14: Contents of the color buffer of the shadow map after a typical penumbra generation

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Theresa Miller

PageId: ELI0E27C7B