Im having bad time with my material optimization. It have Base Pass 655 instuction,682 for surface and 740 for volumetric lightmap. 124 vertex shader and 7 texture samples. Also im working with forward rendering and all my texture samples setted to wrap
So landscape have 5 layer that i blended and 1 more “NotUse” like you see. I have 1 simple function that give me 0-1 value for 0-10000 unreal units for texture tiling. And 5 instanced of the same function that you can see on 4 screenshot.
In that function you can see that i have 3 textures: Color with Height for tessellation in Alpha, Normal and AO/Rough/Met. Im lerping those with same textures but with different UV that divided on 100 in default. What im trying to achive is get rid of doubled texture samples, for that im trying to move those 3 lerps node in 1 before texture, so lerp UV and after that connect on texture for every channel.
In 5 screenshot you can see my goal function but ofcourse its not working quite well. Looks like its tiling nonuniformaly every face of landscape, its just a mess. For now i tested worldAlign with textureSize lerp, but i need additional 3 texture samples for that and its looke more like zooming and not a smooth lerp. PixelDepth for distance calculation and what i was really hoping lerp Custom UV0 chanel. Nothing worked out.
Can anybody give me some advice about this? Thanks for reading