Skip to content

docs(sky): fix 9 issues found during design review of sky-rendering.md - #778

Open
JeanPhilippeKernel wants to merge 2 commits into
developfrom
docs/sky-rendering-review
Open

docs(sky): fix 9 issues found during design review of sky-rendering.md#778
JeanPhilippeKernel wants to merge 2 commits into
developfrom
docs/sky-rendering-review

Conversation

@JeanPhilippeKernel

Copy link
Copy Markdown
Owner

Design review of sky-rendering.md found 9 issues. All fixed in this PR.

Critical (would fail to compile or produce wrong GPU output)

  • NodeMap API error in Section 7 — replaced with graph->SetPassEnabled("SkyboxPass", false) (the actual RenderGraph API)
  • SkyAtmosphereUBO set/binding conflict between Section 3.4 (set 0 binding 1) and Section 9 (set 1 binding 0) — canonicalised to set 0 binding 1 throughout
  • IBL set number conflict between Section 4.4 (set 4) and Section 9 (set 2) — canonicalised to set 2 throughout

Wrong computation

  • Aerial perspective LUT dispatch count — local_size 8x8x1 + dispatch 4x4x8 = 32x32x8 threads, not 32x32x32. Fixed by changing local_size to 8x8x4 so dispatch 4x4x8 gives the correct 32x32x32 total

Struct bug

  • SkySpherePush comment said "80 bytes" but struct had 84 (extra _pad field). Removed _pad; struct is now exactly 80 bytes

Missing synchronization spec

  • SkyLightPass IBL compute outputs are persistent externals that bypass the RenderGraph barrier system. Added explicit note: SkyLightPass::ExecuteCompute() must record a COMPUTE_SHADER_WRITE → FRAGMENT_SHADER_READ barrier before returning

Clarifications

  • LUT output bindings: clarified that the four set 1 binding 0 outputs are in separate shaders, not co-resident
  • MieScattering CPU packing: SkyConfig::MieScattering is a scalar but SkyAtmosphereUBO::MieScattering is Vec4f — added note to expand as Vec4f(x,x,x,0)
  • Pass name: GeometryPassGbufferPass (matches actual pass name in GraphicRenderer)
  • .exr not supported in initial implementation (stb_image handles .hdr only)

- Fix NodeMap API error: replace with SetPassEnabled() (Section 7)
- Resolve SkyAtmosphereUBO set/binding conflict: canonicalise to set 0 binding 1 (Section 3.4 and 9)
- Resolve IBL set number conflict: canonicalise to set 2 (Section 4.4 and 9)
- Fix aerial perspective local_size: 8x8x1 -> 8x8x4 so dispatch 4x4x8 is correct (Section 3.4/3.5)
- Fix SkySpherePush size: remove _pad field, total is now 80 bytes as stated (Section 6)
- Add compute->fragment barrier note for SkyLightPass IBL writes (Section 4.4, 8)
- Clarify LUT output bindings are in separate shaders, not co-resident (Section 3.4)
- Add MieScattering CPU packing note: scalar expanded to Vec4f(x,x,x,0) (Section 3.3)
- Fix pass name GeometryPass -> GbufferPass and note .exr not supported initially (Section 8, 5)
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.

1 participant