So, i finished writing my shader to apply a set of textures to my terrain and i would like to make the system more flexible: right now there has to be two textures that will be mapped from the top and two from the side. I would like to have an array of structures(containing textures and floats) that i could edit from, well, the editor. Does anybody knows how it is done? I saw a thread for the same issue were it was suggested to use Material.setArray from a C# script and have every component of the structure in seperate arrays but this solution isn't very convinent, is there another way? Thanks in advance!
You can use a structured buffer to pass an array of structs containing float or integer values. But textures have to be separate. For one, you can’t have an array of textures. You can have a Texture2DArray, but this is essentially single 3D texture that doesn’t do any filtering between the layers.