## [GAMES 202] Lecture Note 7

### PRT Recap

#### PRT in Glossy Reflection

The light transpart in glossy case:

The BRDF term is dependent to the exiting direction which may be any value, leading to another 2D function . More specifically: for each fixed , we can SH project the light transport part, getting the coefficient .

Then for each , we SH project to get the final SH projection of , the coefficients of the reflected radiance.

This leads to a vector-matrix multiplication at runtime, resulting computations at both precomputation and runtime.

#### Decomposing Lighting: Another Perspective

Take as a part of the environment lighting, and add them together.

**SH: Limitations**
Low frequency
Dynamic lighting but static scenes
Huge precomputational costs

#### More Basis Functions

Wavelet* (All frequencies, pretain only the biggest coefficients for compression, but no fast rorations) Zonal Harmonics Sperical Gaussian Piecewise Constant

### Realtime Global Illumination

[What is] one more indirect bounce?
Any directly lit surface will act as a light source again (*secondary light source* w.r.t. primary light source)

[What is] needed for one bounce indirect illumination?
Get every direct lit surface (the *surface patches*)(1) and their contributions (incident radiance) to each point(2).
(1) Take each pixel as a surface patch, get through shadow map.
(2) The outgoing radiance to eye is known, but we can assume __secondary light sources__ are all lambertian surfaces.

#### Reflective Shadow Maps, RSM

Rendering equation: area-integration form

For a specific point , not all pixels (surface patches) can contribute, due to their visibility , distance and orientation . We omit the visibiilty term since it’s hard to compute.

**Acceleration**:
All pixels in the shadow map can contribute to . We can decease the number of contributing texels by consider only the nearby texels (nearby in shadow map: 2D neighborhood and similar depth) and sampling.
(This is an approximation of 1-bounce indirect lighting!)

**Pros:**
Easy implementation (similar to VSM)?
**Cons:**
Linear cost to nLights (Shadow Map)
No visibility check
Too many approximations (distance, diffuse secondary lights, etc.)

**Extra notes:**
RSM is similar to Virtual Point Lights (VPL) in PBR.
RSM is a screen space algorithm, but it has all necessary information in 3D space (i.e. the secondary light sources).