I was wondering if anyone knew where I could find a shader that was a combination of the default Transparent/Diffuse and and Mobile/Background shader.
Thanks in advance!
I was wondering if anyone knew where I could find a shader that was a combination of the default Transparent/Diffuse and and Mobile/Background shader.
Thanks in advance!
Just add Emission [_Color] to the first one in the Material block.
Sorry Jessy, I asked the wrong question. Self Illum isn’t what I was looking for; I want it to just completely ignore the lighting in the scene. I think Mobile/Background is what actually does that
Shader "Mobile/Background" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
Tags {"Queue" = "Background" }
Material { }
Lighting Off
Zwrite off
Fog { Mode Off }
SetTexture [_MainTex] {
Combine texture
}
}
}
}
Shader "Transparent/Diffuse" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
LOD 200
CGPROGRAM
#pragma surface surf Lambert alpha
sampler2D _MainTex;
float4 _Color;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
Fallback "Transparent/VertexLit"
}
Thanks again!
Like this?
Or, even more simply, if you need no tint:
Shader "Transparent Texture" {
Properties {
_MainTex ("Texture (A = Transparency)", 2D) = ""
}
SubShader {
Tags {Queue = Transparent}
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Pass {SetTexture[_MainTex]}
}
}
Perfect, thank you very much!