Shading Calculations At A Lower Than Per-Pixel Frequency
3D graphics programmer Jeremy Shopf has written up an interesting post documenting techniques for "performing shading calculations at a frequency lower than per-pixel." Depending on lighting effect frequency and surface orientation relative to camera, developers can compute values at a lower resolution or at an adaptive sampling.
On the likely most used technique, Off-screen Particles, Shopf explains, "The basic idea is that you blend your particles into a lower than screen resolution texture to save on fill rate. Particles, like smoke, are notorious fill rate hogs due to massive amounts of overdraw and potentially expensive per-pixel lighting computations. In order to get correct particle occlusion, a manually downsampled depth buffer has to be used for depth testing the lower resolution particle buffer." He goes on to mention a problem that can develop with particle-scene intersections, offering a solution and suggestions for optimizations.
Shopf also summarizes Bilateral Upsampling: "The concept is to bilinearly interpolate lower resolution illumination results while applying a weighting function to interpolants so that values aren't interpolated across boundaries. In some situations it is required to perform additional computation near boundaries. This situation is handled similarly to the off-screen particle method: edge detection and selective higher resolution calculation in edge regions."
The third and final method Shopf examines is Adaptive Soft Shadows with Push-Pull Reconstruction, a technique introduced by Gaƫl Guennebaud: "This trick computes soft shadow amounts at adaptive resolution rather than simply at a lower resolution as in the previously discussed methods. While not as simple to upsample, computing values adaptively based on surface orientation and shadow frequency allocates more fidelity in regions that need it. The other methods simply pick some lower resolution and forgo any higher frequency information."
