Hello everyone I'm trying to make a shader that takes a mesh and does a blend between just regular terrain and a single texture on another mesh. Since unity has a limit of 16 samplers (and i'm using 16 samplers in one single surface shader) i needed to split it up in 2 passes by just drawing the regular texture and then the terrain blrending on top. but something is funky about the end result: And here is the code for the blend: Code (CSharp): Shader "Terrain/6lyr_terrain_blend" { Properties { _blend1 ("Blendmap 1", 2D) = "white" {} _blend2 ("Blendmap 2", 2D) = "white" {} _MainTex ("MainTex", 2D) = "white" {} _MainTexn ("MainTex normal", 2D) = "white" {} _Layer1 ("Layer1", 2D) = "white" {} _Layer1n ("Layer 1 normal", 2D) = "white" {} _Layer2 ("Layer2", 2D) = "white" {} _Layer2n ("Layer 2 normal", 2D) = "white" {} _Layer3 ("Layer3", 2D) = "white" {} _Layer3n ("Layer 3 normal", 2D) = "white" {} _Layer4 ("Layer4", 2D) = "white" {} _Layer4n ("Layer 4 normal", 2D) = "white" {} _Layer5 ("Layer5", 2D) = "white" {} _Layer5n ("Layer 5 normal", 2D) = "white" {} _Layer6 ("Layer6", 2D) = "white" {} _Layer6n ("Layer 6 normal", 2D) = "white" {} } SubShader { Tags { "Queue"="Geometry" "RenderType" = "Opaque"} Cull Off //BLENDMAPS DRAWING CGPROGRAM #pragma surface surf Lambert noforwardadd #pragma target 3.0 sampler2D _MainTex; sampler2D _MainTexn; struct Input { float2 uv2_MainTex; float4 color : COLOR; }; void surf (Input IN, inout SurfaceOutput o) { float4 m = tex2D (_MainTex, IN.uv2_MainTex); float3 mn = UnpackNormal(tex2D (_MainTexn, IN.uv2_MainTex)); o.Albedo = ((m * IN.color.w) * IN.color); o.Normal = (mn * IN.color.w); } ENDCG Blend One One //BLENDMAPS DRAWING CGPROGRAM #pragma surface surf Lambert noforwardadd #pragma target 3.0 sampler2D _blend1; sampler2D _blend2; sampler2D _Layer1; sampler2D _Layer1n; sampler2D _Layer2; sampler2D _Layer2n; sampler2D _Layer3; sampler2D _Layer3n; sampler2D _Layer4; sampler2D _Layer4n; sampler2D _Layer5; sampler2D _Layer5n; sampler2D _Layer6; sampler2D _Layer6n; struct Input { float2 uv_blend1; float2 uv_Layer1; float2 uv2_MainTex; float4 color : COLOR; }; void surf (Input IN, inout SurfaceOutput o) { float4 b1 = tex2D (_blend1, IN.uv_blend1); float4 b2 = tex2D (_blend2, IN.uv_blend1); float4 l1 = tex2D (_Layer1, IN.uv_Layer1); float4 l2 = tex2D (_Layer2, IN.uv_Layer1); float4 l3 = tex2D (_Layer3, IN.uv_Layer1); float3 l1n = UnpackNormal(tex2D (_Layer1n, IN.uv_Layer1)); float3 l2n = UnpackNormal(tex2D (_Layer2n, IN.uv_Layer1)); float3 l3n = UnpackNormal(tex2D (_Layer3n, IN.uv_Layer1)); float4 l4 = tex2D (_Layer4, IN.uv_Layer1); float4 l5 = tex2D (_Layer5, IN.uv_Layer1); float4 l6 = tex2D (_Layer6, IN.uv_Layer1); float3 l4n = UnpackNormal(tex2D (_Layer4n, IN.uv_Layer1)); float3 l5n = UnpackNormal(tex2D (_Layer5n, IN.uv_Layer1)); float3 l6n = UnpackNormal(tex2D (_Layer6n, IN.uv_Layer1)); float4 r1 = lerp(l1,l1,b2.r); float4 g1 = lerp(r1,l2,b2.g); float4 xb1 = lerp(g1,l3,b2.b); float4 r2 = lerp(xb1,l4,b1.r); float4 g2 = lerp(r2,l5,b1.g); float4 xb2 = lerp(g2,l6,b1.b); o.Albedo = ((xb2 * (1 - IN.color.w)) * IN.color); float3 r1n = lerp(l1n,l1n,b2.r); float3 g1n = lerp(r1n,l2n,b2.g); float3 xb1n = lerp(g1n,l3n,b2.b); float3 r2n = lerp(xb1n,l4n,b1.r); float3 g2n = lerp(r2n,l5n,b1.g); float3 xb2n = lerp(g2n,l6n,b1.b); o.Normal = (xb2n * (1 - IN.color.w)); } ENDCG } }