Skip to content

Texture type validation fixes. - #120902

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
blueskythlikesclouds:texture-type-validation-fixes
Jul 3, 2026
Merged

Texture type validation fixes.#120902
Repiteo merged 1 commit into
godotengine:masterfrom
blueskythlikesclouds:texture-type-validation-fixes

Conversation

@blueskythlikesclouds

Copy link
Copy Markdown
Member

What problem(s) does this PR solve?

Follow-up to #120876 to solve texture type checks in half/quarter resolution sky textures alongside other tweaks.

Additional information

  • I changed get_default_shader_rd to cache the results. Profiling showed this function sometimes taking up to 0.11~ ms, which comes from the shader version mutex.
  • UniformSetFormat now accounts for texture type/format, which can catch mismatches at draw time. This caught depth prepass creating uniform sets with texture2D instead of texture2DArray for multiview rendering. This was caused by _setup_render_pass_uniform_set checking for multiview through p_render_data, which is nullptr for depth prepass.
  • Now passing the correct multiview shader variants to sky shaders to fix half/quarter resolution texture type mismatches.
  • Similarly, fog only sky rendering was also passing incorrect texture types. Now, a separate uniform set for multiview is created and tracked.

@clayjohn clayjohn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good, just a small suggested change

Comment thread servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp Outdated
@blueskythlikesclouds
blueskythlikesclouds force-pushed the texture-type-validation-fixes branch from 04e0f78 to 70daaad Compare July 3, 2026 17:35
@clayjohn clayjohn modified the milestones: 4.x, 4.8 Jul 3, 2026
@Repiteo
Repiteo merged commit c68c74d into godotengine:master Jul 3, 2026
20 checks passed
@Repiteo

Repiteo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@blueskythlikesclouds
blueskythlikesclouds deleted the texture-type-validation-fixes branch July 6, 2026 10:04
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…re-type-validation-fixes

Texture type validation fixes.
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.

3 participants