# Chapter 20. GPU-Based Importance Sampling — Colbert, Křivánek

- Source: https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-20-gpu-based-importance-sampling
- Volume: GPU Gems 3
- Note: add-only excerpt; images omitted.

## Summary of full chapter read
Real-time glossy IBL via Monte Carlo in one shader; minimal precomputation vs wavelet/SH prefilters.

### Estimator
Illumination integral Lo(v)=∫ Li(u) f(u,v) cosθ du. Sample BRDF PDF (normalized Phong lobe); weight by 1/pdf. Hammersley low-discrepancy sequence precomputed as constants (deterministic → aliasing).

### Filtered importance sampling
LOD from solid angle of sample: mip level ≈ ½ log2((w·h)/N) − ½ log2(pdf) − ½ log2(d(u)), plus bias +1. Low pdf → blur more of env map. Dual-paraboloid maps (scale b=1.2) because cube-map faces mip independently. Diffuse via SH; glossy via this sampling. ~24 samples complex geo, ~40 for smooth spheres. Materials/env fully dynamic.

