Repository navigation
Fix controls for shadow-only casters - #3087
adrian-andrzjewski wants to merge 1 commit into
Conversation
jaime-jmebot
left a comment
There was a problem hiding this comment.
Hi Adrian, thanks for putting this fix together. The change addresses the shadow-only caster path directly: it runs render controls for queued casters and their ancestors with the shadow camera active, while deduplicating shared ancestors within a pass, and restores the render manager’s forced material and technique even if a control throws.
I reviewed the helper and its call site alongside the regression tests. The identity-based set is a good fit for scene-graph spatials, and creating it per invocation ensures controls can run again on the next shadow pass. The tests cover both shared-parent deduplication and repeated callbacks across separate passes, and the material/technique restoration is protected by finally, which is important for leaving subsequent rendering state intact.
Looks good to me. Thanks for including both regression coverage and a runtime reproduction!
|
Is this something you need in your use case? |
Fixes #1875
What changed
Validation
:jme3-core:test: 1,216 tests, 0 failures, 0 errors, 1 skipped.SpotLightShadowRenderer: the caster was outside the main camera frustum, was queued for the shadow map, and its render control ran 89 times over 90 frames (RTX 2060 SUPER).