I just upgraded to the Unity 3.4 trial and am moving my game to be android capable. I have been developing my game on windows with the free version of Unity until I got the game at a level I would be happy releasing a lite version, I’m spending the time between Thanksgiving and Christmas burning the midnight oil to get a lite version ready and am hoping to buy Android after the new year. The Shader was working just fine when doing a PC version on Unity 3.something but now everything I have with this shader on just appear black
My shader takes 3 textures, splits two into seperate channels for various uses. I know little to nothing about shaders and have just been piecing this one together with limited help some assistance from STrumpys Shader Editor.
//Color and Vector properties map to float4 variables.
//Range and Float properties map to float variables.
//Texture properties map to sampler2D variables for regular (2D) textures.
Shader "Custom/UltraShader" {
Properties {
_MainTex ("BaseTex (RGB)", 2D) = "white" {}
_TintMap("TintMap (RGB)", 2D) = "white" {} //R=Primary, B=Secondary
_EmOpSpec("_EmOpSpec", 2D) = "white" {} //R=Emission, B=Opacity, G=Specularity
_PrimaryTint ("PrimaryTint", Color) = (1.0, 1.0, 1.0, 1.0)
_SecondaryTint ("SecondaryTint", Color) = (1.0, 1.0, 1.0, 1.0)
_Emission("_Emission", Range(0,1) ) = 0
_Alpha("_Alpha", Range(0,1) ) = 1
}
SubShader {
Tags {
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Opaque"
}
LOD 200
Cull Off
ZWrite On
ZTest LEqual
ColorMask RGBA
Blend SrcAlpha OneMinusSrcAlpha
Lighting Off
CGPROGRAM
#pragma surface surf BlinnPhong
sampler2D _MainTex;
sampler2D _TintMap;
sampler2D _EmOpSpec;
float4 _PrimaryTint;
float4 _SecondaryTint;
float _Emission;
float _Alpha;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
//Main Texture
half4 diffuse = tex2D (_MainTex, IN.uv_MainTex);
//Tint map and Split of Tint
float4 TintMap=tex2D(_TintMap,IN.uv_MainTex);
float4 Split0=TintMap;
//Setup of Primary
float4 SplatAlpha0=_PrimaryTint.w;
float4 Invert4= float4(1.0, 1.0, 1.0, 1.0) - Split0.x;
float4 Invert5= float4(1.0, 1.0, 1.0, 1.0) - _PrimaryTint;
half4 primaryTint = SplatAlpha0*(Invert5 * Invert4);
//Setup of Secondary
float4 Invert6= float4(1.0, 1.0, 1.0, 1.0) - Split0.y;
float4 Invert7= float4(1.0, 1.0, 1.0, 1.0) - _SecondaryTint;
half4 secondaryTint = SplatAlpha0*(Invert7 * Invert6);
//Emission
float4 SOEMap=tex2D(_EmOpSpec,IN.uv_MainTex);
float4 Split1=SOEMap;
float4 Invert8= float4(1.0, 1.0, 1.0, 1.0) - Split1.x;
float4 Multiply4 = _Emission.xxxx * Invert8;
float4 Multiply5 = _PrimaryTint * Multiply4;
//Alpha
float4 Subtract1=_Alpha - Split1.y;
//Specular
//Gloss
//Apply Tints
half4 c = diffuse - (primaryTint + secondaryTint);
o.Albedo = c.rgb;
o.Emission = Multiply5;
o.Alpha = Subtract1;
}
ENDCG
}
Fallback "VertexLit"
}
Any help would be great.