2. MAIN PARTS
Particle Rendering for Snow Generation
Shadow Mapping for Snow Accumulation
Fog Effect
3. SNOW ACCUMULATION
Rendering Depth Map
From the view of the sky with orthographic camera
Render depth values to texture
4. SNOW ACCUMULATION
Rendering Object
Shadow testing: not exposed when depth larger than
depth map value
Read depth map value
VL = Ms * Mp * Mv * Mm * V
VL projected vertex from light source
Ms scale matrix (-1, 1) to (0, 1)
Mp light source projection
Mv light source view from world
Mm model to world
V vertices