- Home /
Transparent shader with color property and no lighting help
Hi,
I found the transparent diffuse shader online, but how do remove the lighting from it?
or if there is a shader out there with
Transparency, Color property (to change the alpha val) and no lighting please let me know
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;
fixed4 _Color;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
Fallback "Transparent/VertexLit"
}
Answer by theUndeadEmo · Aug 19, 2013 at 02:59 PM
found one
would be nice to know if this is better than Transparent/ Diffuse shader.
i am making an assumption it is as it is not using lighting
Have you tried this shader (AlphaTest)? Does it do what you want? Because it is different than the shader above in that it uses an 'Alphatest' That means that pixels are either on or off, so you don't get any transition at the edges, and you cannot make an object semi-transparent.
hey, i need it to go semi transparent for now. may change it later. but thanks
Your answer
Follow this Question
Related Questions
Additive particle shader with higher max alpha? 0 Answers
Transparency cube shader? 1 Answer
Shader for semi-Transparent object with highlighted Edges 1 Answer
Material doesn't have a color property '_Color' 4 Answers
Unlit Shader With Texture, Color, Overbrightness, and Alpha-based Transparency 0 Answers