perf(renderer): per-light shadow path costs ~40 ms; PCF taps are secondary #1086
Labels
No labels
Context: Bug
Context: Enhancements
Platform: Android
Platform: Linux
Platform: Web
Platform: Windows
Platform: iOS
Platform: macOS
Release
Target: CI
Target: CLI
Target: Dependency
Target: Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SakulFlee/Orbital#1086
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Update: the cost is not PCF taps or shadow-map resolution
Phone A/B results:
gpu_deferred73.83 msSo the ~40 ms shadow cost is not the number of texture taps and not shadow-map bandwidth.
The cost is the per-light shadow path and the number of shadowed lights evaluated. Disabling spot shadows removes ~24.7 ms; disabling point shadows removes ~13.7 ms. Removing the eight unshadowed R5 point lights also removes ~31.9 ms, which points at the per-light shadow-slot scan and repeated light setup, not just shadow sampling.
Root cause candidate: #1088. Point/spot “range” is packed as
intensity / 0.01, so lights with intensity 30–60 get a radius of ~55–77 world units. Every light covers the whole scene, so tiled culling is all-inclusive and every pixel pays for most light/shadow evaluations.The first fix is the explicit range in #1088. If further optimization is needed after that, add a per-light shadow-slot index /
has_shadowflag so unshadowed lights do not scan the shadow slot array, and avoid reloading the light incompute_shadow_for_light.perf(android): shadow sampling costs ~40 ms/frame on Mali-G720to perf(renderer): per-light shadow path costs ~40 ms; PCF taps are secondary