Skip to content

Conversation

JellyBoonz
Copy link
Contributor

Fixes the workaround for per-instance uniforms with texture arrays.

The previous documentation suggested indexing could work directly, but GLSL requires sampler array indices to be compile-time constants.

This PR corrects the documentation to explain the limitation and provides a working switch statement workaround with code example.

Fixes #11331

@Calinou Calinou added bug area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:shaders cherrypick:4.4 cherrypick:4.5 labels Oct 6, 2025
@mhilbrunner mhilbrunner merged commit 12baca6 into godotengine:master Oct 9, 2025
1 check passed
@mhilbrunner
Copy link
Member

Thank you! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug cherrypick:4.4 cherrypick:4.5 topic:shaders

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-instance uniforms texture workaround issue?

3 participants