2 channel Self Illuminating Shader request.

I just don’t get shaders or any sort of programming (I’m using Playmaker). So I’m just going to be cheeky and ask for a shader as I cant find what I’m looking for.

What I want is something like the self illuminating shader, a Main Colour but with 2 seperate textures with alpha channels, so still with 2 textures, not ending up with 4. Then I want the textures to multiply together.

So, any help?

Well I gave it a go and got this far but how do you get the colour tint to work?

Shader "Custom/IlumBlend" {

Properties {
	_Color ("Color Tint", Color) = (1,1,1,1)
	_MainTex ("Texture 1", 2D) = "" 
	_Texture2 ("Texture 2", 2D) = ""
}

SubShader {	
	Pass {
		SetTexture[_MainTex]
		SetTexture[_Texture2] { 
			combine texture * primary + previous
		}		
	}
} 

}

I downloaded the shaders and opened up the Illumin diffuse to edit.

But it’s still not right. The textures don’t blend properly.

Shader "IllumBlend2" {
Properties {
	_Color ("Main Color", Color) = (1,1,1,1)
	_Tex1 ("Texture1 (RGB) Gloss (A)", 2D) = "white" {}
	_Tex2 ("Texture2 (RGB) Gloss (A)", 2D) = "white" {}
	_EmissionLM ("Emission (Lightmapper)", Float) = 0
}
SubShader {
	Tags { "RenderType"="Opaque" }
	LOD 200
	
CGPROGRAM
#pragma surface surf Lambert

sampler2D _Tex1;
sampler2D _Tex2;
fixed4 _Color;

struct Input {
	float2 uv_Tex1;
	float2 uv_Tex2;
};

void surf (Input IN, inout SurfaceOutput o) {
	fixed4 tex = tex2D(_Tex1, IN.uv_Tex1);
	fixed4 c = tex * _Color;
	o.Albedo = c.rgb;
	o.Emission = c.rgb * UNITY_SAMPLE_1CHANNEL(_Tex2, IN.uv_Tex2);
	
}
ENDCG
} 
FallBack "Self-Illumin/VertexLit"
}
Shader "Custom/IlumBlend" {
     
    Properties {
            _Color ("Color (RGB)", Color) = (1,1,1,1)
            _Texture1 ("Texture1 (RGB) Texture (A)", 2D) = "white" {}
            _Texture2 ("Texture2 (RGB) Texture (A)", 2D) = "white" {}
     }
        SubShader {
        Pass {
         
            Lighting Off

            SetTexture [_Texture1] {
            constantColor [_Color]
                combine constant lerp(texture) previous
            }
             SetTexture [_Texture2]{
             	combine texture lerp (texture) previous
             }
        }
    }
}

Ok, this is the closest I’ve gotten. I don’t understand or know if you can combine both textures and the colour in 1st set of {}?

Have you tried to write an actual shader?

Well I got told to look at this:

So I just copied and pasted. Deleted the bits that I didn’t seem to need.

Then I looked at this:

When I take out the Blend or try anything with it, I get the pink error. I don’t know how to use Lerp(constant) previous or SetTexture[] {Combine previous * primary Double} or any combination of these magic words. So I have been moving lines around to no avail.

So write, no. Amalgamate, yes.