perf(renderer): per-fragment lighting and shadows dominate both Android forward and deferred paths #1085
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#1085
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?
Summary
The Android regression is not deferred-renderer-specific. Forward and deferred now spend nearly the same time in shared per-fragment lighting and shadow evaluation.
Fresh phone A/B at native resolution (Mali-G720, 1220x2582, same scene/settings):
gpu_deferred73.61 msgpu_deferred33.15 msgpu_deferred4.01 msAttribution from the controlled A/B:
All four runs had exact subpass sums; this is real GPU work, not timestamp accounting. Variant C still reports 8 shadow caster components because they exist but are disabled;
gpu_shadowconfirms none are rendered.Conclusion
The actionable levers are the 16 point/spot lights and the 8 shadowed lights, plus shadow-sampling quality/culling, in both forward and deferred paths. Do not treat this as a deferred-pass-only issue.
Follow-ups
Acceptance criteria
perf(android): deferred lighting dominates hybrid renderer at ~74 ms on Mali-G720to perf(renderer): per-fragment lighting and shadows dominate both Android forward and deferred pathsThe batch points to a root cause that explains the earlier culling result: #1088. Point/spot range is packed as
intensity / 0.01; intensities of 30–60 therefore produce radii of ~55–77 world units, larger than the scene. Every light covers every tile, so tiled culling is all-inclusive and every pixel evaluates most lights and shadow slots.Supporting evidence:
Fix #1088 first (real range + smooth falloff), then remeasure both paths. A per-light shadow-slot index remains a secondary optimization.
Fixed on
feat/perf-timingsinb7086621. The light range is now explicit (default 10 units), glTF range is honored,params.zpacks range², and forward/deferred/volumetric shading uses a smooth range window.Device confirmation before the fix: changing the packed range to radius 10 reduced
gpu_deferredfrom 73.83 to 21.26 ms and improved FPS from 9.50 to 20.00; radius 20 was 44.00 ms. The next capture should use the real range field and then re-run culling/shadow tests.