Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

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

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELI0E27C7B
img
Uploaded by :
AnA9DBxG
Page 1 Preview
wsection shadows soft shadows step mul
Sell Your Old Documents & Earn Wallet Balance