I’m still stuck with this one, does anyone know how I could get the transparency working here?
I thought since I added the extra alpha section in here that it would allow me to use tranparency but it still doesnt work Color) = (0,0,0,0)
Hey thanks arioch82
The alpha is playing a part in the texture now but I it doesn’t seem to play nice zdepth wise. Some objects appear in front but it seems okay with other objects… I tried the ztest option and I’ve included ZWrite but it cant get it to look right.
Any ideas?
Shader "Petes/Solid Color" {
properties{
_Color ("Solid Color",color) = (0,0,0,0)
}
subshader{
Cull Off
ZWrite On
color [_Color]
pass{
Blend SrcAlpha OneMinusSrcAlpha
}
}
}
I’m quite new to the shader programming (I’m approaching them for the first time just in these days), i know how to apply an alpha from a texture but not to a solid color from a float sorry
I took the liberty of changing the indentation it a bit :P.
The secret is the Tags {“Queue”=“Transparent”} line, which tells unity to draw the object in the transparent queue. This makes sure it is drawn with the other transparent objects, in back-to-front order.