Closed MichaelEGA closed 1 year ago
I haven't tested this, but it doesn't seem to make much sense. Does the problem also happen in the URP terrain shader version?
Actually, sorry to reopen this, but the stochastic node is causing the line between neighbour terrains not the blending. :(
Stochastic Off
Stochastic On
Unfortunately I can't test the URP terrain shader as it pops up pink in my current version of unity 2022.2.2f1. I did have it working previously in an older version, but I didn't focus much on the terran boundaries, so not sure if the problem was present.
I think this is really a limitation. The UV randomization is calculated per object local UV position, not world space. I don't know if it is possible to use world space for randomization, probably someone else more experienced in shaders I can answer/fix this.
I added a note in the readme. It's possible to avoid that using a mask (such as vertex color) to define where the stochastic effect is affected, so use vertex color painting to remove the stochastic texturing from borders of the model. I don't know if this will help you in this case.
Thanks for your quick relply.
I successfully eliminated the line by creating a subshader that faded the edges of the terrain back to the non-stochastic texture.
Here's the project I used your node in: https://github.com/michael-evan-allison/Unity-Terrain-Shadergraph
I think we can close this issue.
Thanks again for the great node!
This looks very cool!
Love this node but it doesn't tile across neighbour terrains, it leaves a line.
Would it be possible to make it fade back to a normal tiled terrain at the edges so that you don't get a line?