engine
engine copied to clipboard
Implement cheaper shadow sampling
In current implementation, PCF3 is the cheapest available shadow sampling. For mobile, especially older devices, even cheaper filtering could be implemented. PCF2, and even possibly single tap sampling (which is getting used in mobile games) to keep the shadow cost down.
PCF1 is added to clustered lights: https://github.com/playcanvas/engine/pull/3763
- on webgl1 this is a single sample with point filtering (linear filtering would need 4 samples)
- on webgl2 this is a single sample with linear depth filtering
- What is left to do is to add PCF1 filtering support to directional lights.