Array Godot Shader

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JohnHamilton

is it possible to get an array in to Godot Shader language e.g. i want to pipe in an array from gdscript of positions ? and do something with a for loop.

:bust_in_silhouette: Reply From: Zylann

I think the Godot shading language doesn’t support arrays at the moment. You can use a texture but it’s not ideal because some graphics cards have a limited amount of textures they can sample in one shader. It would work though if you don’t have many textures.

There is a request for it: Shader language: implement arrays support · Issue #10751 · godotengine/godot · GitHub