by Amplify_Borba » Wed Apr 03, 2019 9:17 am
Hey there, unfortunately that documentation wasn't updated after we added support for more than four splats, apologies for that!
When examining the sample, notice that we now have a SimpleTerrainAddPass, which is registered in the main shader ( SimpleTerrainFirstPass ) as a dependency, and while the main shader is responsible for mixing the first 4 splats, the SimpleTerrainAddPass is used to add any further pass, which depends on the SplatCount Tag set into the main shader.
Please note that Unity's terrain has a maximum of 3 shaders, in this case there's the Base, First Pass and Add Pass.
As a further example, the shader function we provide may only use 4 splats, so if you have 9 splats, you'll be using the First Pass and the Add Pass will be called twice ( 4 + 4 + 1 ).