Terrain-Shader: more than 4 splats

Node-based Shader Editor
Post Reply
Cyntherius
Posts: 12
Joined: Thu Dec 14, 2017 1:00 pm

Terrain-Shader: more than 4 splats

Post by Cyntherius »

Hello

im looking for a way to use more then only four splats in the terrain node.
Is there a way to use these node twice in a single pass and the unity terrain engine can also use this shader?

http://wiki.amplify.pt/index.php?title= ... in_Shaders
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Terrain-Shader: more than 4 splats

Post by Amplify_Borba »

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 ).
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Post Reply