Log inGet started
World

Painted Metropolis

Branchmain
Commit1e1d3a3d4d

README.md

shadeCast

This compute shader calculates the ambient shade cast by objects onto the ground, producing the tShade texture for the painterly system. For each texel of the terrain, it simulates rays traveling from the ground towards the sun, checking against the occluder map (generated by painterly.core.occluders) to determine if anything blocks the sunlight. Shade from canopies contributes to the r channel, while solid objects contribute to the b channel. The g channel carries the top's altitude, and a is the canopy flag. This allows for dappled shade under trees and solid shadows from buildings and hills. The shader processes the terrain in strips, allowing the shade calculation to be spread across multiple frames. It reads configuration from a job buffer, including resolution, texel size, sun direction, and number of steps.