Questions about material definitions and shaders


I have a few questions regarding material definitions and the corresponding shaders. I have implemented a material to be used with a terrains, and it uses the fragments Y (height) and the normal (slope) to map textures. Currently I have uniforms named

Texture2D region1ColorMap

Texture2D region2ColorMap

Texture2D region3ColorMap

Texture2D region4ColorMap

Vector3 region1

Vector3 region2

Vector3 region3

Vector3 region4

So the shader is limited to only 4 textures + a special slopeColorMap. Is there a way to use sampler2Darray-s in the shader? How can I pass a texture array in?

That’s all to start with, the rest depends on the answers. Thanks.