Hi~ all
I am beginner… I am not good at English…
I made simple Additive shader for Particle…
I want to change texture brightness with ‘range’ in material Inspector
so… i made this shader…
but… the problem is … transparent part of texture(alpha channel) is appear …
what is wrong in my shader??
help me…please…
Shader "Mobile/Particles/simple_add1" {
Properties {
_MainTex ("main Texture", 2D) = "white" {}
_Bright ("brightness", Range(0.1,2)) = 1
}
Subshader {
Tags {"RenderType" = "Transparent" "Queue" = "Transparent"}
blend SrcAlpha One
CGPROGRAM
#pragma surface surf Lambert alpha
struct Input {
float2 uv_MainTex;
};
sampler2D _MainTex;
half _Bright;
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D(_MainTex, IN.uv_MainTex) * _Bright;
o.Emission = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
Fallback "Mobile/Particles/Additive"
}
yellow part of image is… Alpha channel