hi i dont know how to write shaders at all. but i wanted a shader that doesn't have lighting and its transparent, and i tried a particle shader but i don't want it to be additive ether. could someone post some code up please?
http://www.unifycommunity.com/wiki/index.php?title=UnlitAlpha
or you could try this (which should be blended)
Shader "Unlit/AlphaSelfIllum" {
Properties {
_Color ("Color Tint", Color) = (1,1,1,1)
_MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white"
}
Category {
Lighting On
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Tags {Queue=Transparent}
SubShader {
Material {
Emission [_Color]
}
Pass {
SetTexture [_MainTex] {
Combine Texture * Primary, Texture * Primary
}
}
}
}
}
Either what Mike said, or you might try the built-in Particles/Alpha Blend shader.
In case someone (like me) is looking for the most basic unlit transparent shader, without texture, lighting, only alpha blending, here is what I’ve eventually made and that works:
Shader "Custom/TranspUnlit" {
Properties {
_Color("Color & Transparency", Color) = (0, 0, 0, 0.5)
}
SubShader {
Lighting Off
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Tags {"Queue" = "Transparent"}
Color[_Color]
Pass {
}
}
FallBack "Unlit/Transparent"
}
(“Fallback” command is here in case one would export for a very wierd hardware that would not support this shader.)