(blue) Export the UV map from triplanar and input it to Texture2D array (this need to edit triplanar node).
(red) Convert RGBA to Texture2D
(green) Change input of Triplanar node to Texture2D array
Use a if/else expression from my TextureIndex and output the corresponding texture2D (I know if/else on shader is bad practice, iI need to do it for like 20 textures).
What you’re asking for is pretty specialized. You need an Array version of the Triplanar node. What I’d recommend is that you use the source code for the Triplanar node that’s available in the documentation here: Triplanar Node | Shader Graph | 16.0.6 Put that into a custom code node and make your own new version of the Triplanar node that samples array textures instead of standard 2d textures. That can be done by replacing the instances of SAMPLE_TEXTURE2D in the code with SAMPLE_TEXTURE2DARRAY instead. If you don’t know how to do that, ask and engineer on your team for help. If you don’t have an available engineer, let me know here and I’ll do it.
Thanks you !
I didn’t know that this code on the documentation was the .HSLS code. First I tried to edit TiplanarNode.cs on the package but it was protected of course…
So I made a custom node function taking Texture2Darray and index as input and it’s working !
The looks perfect from what I can see in your screen shot - except you’ll want to create a Normal Vector node and plug that into the Normal input port instead of the Position node as it is now. Nice work with that!