Skip to content

Fix editor crash when ScreenSpaceAmbient is enabled - #40

Open
Joyxt wants to merge 2 commits into
masterfrom
fix/screenspace-ambient-crash
Open

Fix editor crash when ScreenSpaceAmbient is enabled#40
Joyxt wants to merge 2 commits into
masterfrom
fix/screenspace-ambient-crash

Conversation

@Joyxt

@Joyxt Joyxt commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The editor GUI is drawn from ImGuiPass::Render, so ImGuiView::DrawGUI was
updating the editor camera while render passes were being recorded. On the
first frame the FrameGraph was registered and setup with
ScreenSpaceAmbient::None, then rendered with GTAO, and
ComputeDeferredLightingPass::Render asked for a "ScreenSpaceAmbient"
resource that no pass had declared — two asserts, then a null deref in
UserPass::getRWTexture.

  • Update editor cameras from Editor::RunOneFrame, before the renderer runs
    (resolves the existing // TODO : update editor camera *BEFORE* render?)
  • Snapshot the camera settings driving the FrameGraph once per frame in View,
    so registration, Setup and Render always agree. Still needed on its own:
    editing camera properties in the Inspector also happens inside
    ImGuiPass::Render.
  • ComputeDeferredLightingPass::Render now follows the decision made in Setup.

Built and run on Win64 MSVC DX12, Debug and Release, 0 error / 0 warning

Joyxt and others added 2 commits September 5, 2026 12:52
The editor GUI is drawn from ImGuiPass::Render, so ImGuiView::DrawGUI was
updating the editor camera while render passes were being recorded. The
FrameGraph could then be registered and setup with ScreenSpaceAmbient::None
but rendered with GTAO, and ComputeDeferredLightingPass::Render asked for a
"ScreenSpaceAmbient" resource that no pass had declared.

- Update editor cameras from Editor::RunOneFrame, before the renderer runs
- Snapshot the camera settings driving the FrameGraph once per frame in View
- ComputeDeferredLightingPass::Render now follows the decision made in Setup

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fixe ambiant screen space
@Benualdo

Benualdo commented Sep 6, 2026

Copy link
Copy Markdown
Member

Couldn't find C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\Llvm\x64 to lookup version

@Benualdo

Benualdo commented Sep 6, 2026

Copy link
Copy Markdown
Member

Build system has been fixed.

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.

2 participants