1 Year Ago
Mixed Shadows Rework (#710) * Remove mixed shadow fading, it never worked properly, we can do it better, increase mixed light shadows limit to 4, remove light evaluation budget * Support for point light evaluation, let sunlight always have highest evaluation score, debug cleanup * Let directional AO have falloff that better approximates to inverse square law * Use 8k shadow atlas by default so that we downsample less often, reenable not casting shadows on point lights, needs more thought * Have adaptive resolution for mixed shadows * Recode all mixed light selection heuristics 🍷 * Extract importance calculation to CalculateMixedLightImportance, finish it * Cleanup, remove rest of old mixed shadows heuristics that is unused now * Cleanup, do shadow computations every .1 seconds rather than evecry frame * Do a few visibility tests to see if the light is visibile to an entity and not fully shadowed * Don't care at all for lights behind us that are not overlapping the player * Tweak visibility testing, let directional lights go into test rather than just checking if sky is visible * More cleanup * Ortho lights trace on backwards direction, do shadow queries from light's perspective * Do backface culling on ortho lights too * Last final weighting adjustments