Skip to content

Fix IBL creation failure fallback and spurious bake attempts - #1382

Merged
untoldengine merged 1 commit into
developfrom
issue/1380
Oct 21, 2026
Merged

untoldengine merged 1 commit into
developfrom
issue/1380

Conversation

@untoldengine

Copy link
Copy Markdown
Owner

Summary

  • Zero-fill the IBL irradiance/specular/BRDF maps when generateHDR fails, instead of leaving whatever uninitialized/garbage data Metal allocated bound to the render pass — a failed bake is now ignored (no ambient contribution) instead of turning models black.
  • Skip the bake attempt entirely when hdrURL is empty (no environment configured for the scene), which stops the spurious iBLCreationFailed (error 1018) previously logged on unrelated viewport resizes/inits after loading an HDR-less scene.
  • generateHDR's earlier GPU-resource-creation guards now also set iblSuccessful = false, consistent with the catch block.

Fixes #1380

Test plan

  • swift build
  • swift test --filter "EnvironmentAssetRebakeTests|RuntimeEnvironmentLightingTests|EnvironmentReflectionShadingTests" — all pass
  • swift test --filter "RendererTest" — all pass, no more spurious Error: 1018 in logs

Zero-fill IBL textures when generateHDR fails, instead of leaving
uninitialized/garbage data bound to the render pass, so a failed bake
is ignored rather than turning models black. Also skip the bake
attempt entirely when hdrURL is empty (no environment configured),
which stops the spurious iBLCreationFailed error previously logged on
unrelated viewport resizes after loading an HDR-less scene.

Fixes #1380
@untoldengine
untoldengine merged commit 2f0036c into develop Oct 21, 2026
4 checks passed
@untoldengine
untoldengine deleted the issue/1380 branch October 21, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IBL creation failure has no fallback and can fire on unrelated operations, turning models black

1 participant