Hi,
Maybe I’ll have better luck here.
I need to create a shader that allows you to blend more than 2 textures. I started with this below.
http://wiki.unity3d.com/index.php/Blend_2_Textures.
I’ve attempted to try to modify it to incorporate more that 2 textures. I was able to add a third but unfortunetly it will only blend the tex01 and 02 but not the third. I’m a new to writing shaders. Not sure what I did wrong here.
Here’s what I modified.
Shader “Blend 3 Textures” {
Properties {
_Blend01 (“Blend01”, Range (0, 1) ) = 0.5
_Blend02 (“Blend02”, Range (0, 1) ) = 0.5
_MainTex (“Texture 1”, 2D) = “”
_Texture2 (“Texture 2”, 2D) = “”
_Texture3 (“Texture 2”, 2D) = “”
}
SubShader {
Pass {
SetTexture[_MainTex]
SetTexture[_Texture2]
{
ConstantColor (0,0,0, [_Blend01])
Combine previous * constant + texture
}
SetTexture[_Texture2]
SetTexture[_Texture3]
{
ConstantColor (0,0,0, [_Blend02])
Combine previous * constant + texture
}
}
}
}
Any help would be greatly apperciated.
Thanks!