Skip to content

Conversation

stuckupfool
Copy link

I'm proposing a small change to the shading language reference docs to make it clear that per-instance uniform arrays are not supported. Currently the docs mention that per-instance uniforms do not support textures and proceeds to give an example involving uniform texture arrays. However when I read the docs, it wasn't clear to me that non-texture uniform arrays (e.g: instance uniform vec3 my_arr[3]) are also not supported.

Updated warning on per-instance shader uniforms indicating that "instance uniform arrays" are not supported
@AThousandShips AThousandShips requested a review from a team August 14, 2025 09:29
@AThousandShips AThousandShips added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:shaders labels Aug 14, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Looks good to me.

cc @clayjohn (just to make sure this is correct, and an intended limitation rather than a bug)

@stuckupfool
Copy link
Author

Thanks @Calinou.

For reference, the shader editor surfaces this error when using instance with a uniform array:
image

@Calinou
Copy link
Member

Calinou commented Aug 14, 2025

For reference, the shader editor surfaces this error when using instance with a uniform array:

This makes sense, although we should probably change that error message to be more user-friendly (it kind of reads like an internal error right now).

@mhilbrunner mhilbrunner requested a review from clayjohn August 24, 2025 09:47
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 enhancement topic:shaders
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants