I am stuck on an issue with using a 2D texture array with triplanar projection. The issue comes in with the inputs that a texture 2D needs versus a texture 2d array. Traditional triplanar relies on using 2D textures for each axis (X, Y, and Z) separately, and with our 2D texture array we use Z to index the sample. Is there anyway I can get this to work?
According to research, I need to use the index of the array texture to retrieve the appropriate texture data for each axis during the projection calculation.
Perhaps I should state the intention of this conversion. I am setting up a master material with multiple layers. If I am not mistaken, we can use 2d texture arrays to store textures more efficiently as opposed to simply using the textures (Albedo, Normal, etc.) per layer. I have managed to convert Cellbombing to use the 2D Texture Array, though it seems odd numbered samples have an offset for some reason.
So I am over thinking it an just remake the dang material I remember watching this video a few weeks ago, but I am returning to landscapes this week and going over what I have done so far. I think I get it now haha
Okay, I see what you are saying for sure. Had to keep watching the video to digest everything haha. We can use a single sample for the whole thing. You say “sample a runtime virtual texture” as opposed to using just a scalar parameter to set the index?
Okay so I updated the material to use the single sample method you provided. Now I am having trouble with the output of texture 2d array parameter, which is translating to the same issue of missing Z data I believe
Going to keep playing with it and researching, I will post anymore updates I find.
I tried opening the image you posted in a separate tab with no luck, it is super blurry I will go back and rewatch the video now that my head is clear. I did manage to figure it out a solution to my issue though, which I will post below!
Have to make 3 edits because my grammar is wack sometimes.
I just want to say thanks again for your work, you really helped me work through this. Cheers!
Yeah I snapped that from the video so double the amount of blur… I couldn’t really see your one in detail either, but was going by the colors of the nodes. It looks like you’ve put the first inputs in the correct places for the Additions (also, it looks like your 3rd channel is an add rather than a multiply, could just be the blur though) but wiring them into the make float3 the wrong way around: