Skip to content

Renderer: Simplify shader and cluster builder#115108

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
stuartcarnie:simplify_cluster_builder
Mar 23, 2026
Merged

Renderer: Simplify shader and cluster builder#115108
akien-mga merged 1 commit into
godotengine:masterfrom
stuartcarnie:simplify_cluster_builder

Conversation

@stuartcarnie
Copy link
Copy Markdown
Contributor

@stuartcarnie stuartcarnie commented Jan 18, 2026

Simplify cluster_builder code

  • Apple devices leverage MSAA for improved cluster builder quality
  • gl_HelperInvocation + MSAA is the root cause of the rendering artifacts.
  • Disable the gl_HelperInvocation check using a specialisation constant, which removes two variants from compilation
  • Remove NO_IMAGE_ATOMICS variant, as the macros are not used in cluster_render.glsl, removing a further two variants.

Important

I didn't observe any noticeable impact on perf.

For reference, the rendering artefacts looked like the following when MSAA is enabled and gl_HelperInvocation is used:

CleanShot 2026-01-18 at 07 17 38@2x

- gl_HelperInvocation + MSAA is the root cause of the rendering
  artifacts.
- Disable the gl_HelperInvocation check using a specialisation constant,
  which removes two variants from compilation
- Remove NO_IMAGE_ATOMICS variant, as the macros are not used in
  cluster_render.glsl, removing a further two variants.
@clayjohn clayjohn modified the milestones: 4.x, 4.7 Mar 23, 2026
@akien-mga akien-mga merged commit d768023 into godotengine:master Mar 23, 2026
20 checks passed
@akien-mga
Copy link
Copy Markdown
Member

Thanks!

@stuartcarnie stuartcarnie deleted the simplify_cluster_builder branch March 23, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants