This does clamp terrain splat mask to 0/1 values so gradual transition pixels are removed. Problem is this introduces artifacts between textures where those gradual transition pixels should have been.
_Pow1 float lets me reduce the the gap between textures, and _Pow2 helps sharpen it. But no matter what values I use i still get problematic places in transitions.
Has anyone tried something similar? Why does terrain mask behave differently?
I was able to reduce effect further by lerping textures in Firstpass shader instead of adding them. But when I tried same in AddPass shader that didn’t work.
I tried some work arounds.
I can’t increase the control texture resolution as that impacts my performance greatly and I already use multiple terrains. I end up with 64 terrain chunks 65mb each and 4GB load in memory(250x250, Control texture resolution 2048) to get transition quality I want. Even with limiting chunks through streaming performance is not that great with that setup.
I looked at CTS terrain shaders plugin and microsplat, I cant use them because I have custom shader with some toon effects and implementing them in those shaders is far beyond my skill. They also suffer from same problems as me with reduced sharpness(although to much lesser extent)
Hey, thank you.
I think if makes it super slow. But filtering mode did help me understand something more.
here is splat map with trilinear textures (with lerp method applied)
Here is same with point textures
See the three semi transparent pixels between gravel and snow? I think those get deleted from the splat map completely with pow and this causes them to be black somehow during addition of splats, and show first splat map during lerp blending of splats.
I also exported splat map and added bunch over overlays on it to simulate pow. and Lo and behold black spots:
you just need to define breakup texture
in Add pass same thing except change surf decal:add to decal:blend
and change o.Alpha = 1 to o.Alpha = saturate(splat_control.r + splat_control.g + splat_control.b + splat_control.a);
now depending on breakup texture you assign you should get different blends with minimal artifacts.