- Home /
Question by
Case23 · Jul 01, 2010 at 07:03 AM ·
shadertransparencyculling
Backface Transparent Diffuse Shader
Im totally new at Shaders, and i really understand only a bit, but i want one which shows me only the backfaces of an Object in a color i want with transparancy.
What i have till now is this. All works except the transparancy.
Shader "Show Insides" { Properties { _Color ("Main Color", Color) = (1,1,1,0) }
SubShader
{
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
Color [_Color]
Cull Front
}
}
}
Comment
Best Answer
Answer by Tetrad · Jul 01, 2010 at 07:10 AM
Try putting this in there:
Tags {"Queue" = "Transparent" }
In which line exactly? Properties, Subshader, Pass? And stupid me, now it works fine, i just forgot to set a alpha value in the material.SetColor("_Color", new Color(1, 1, 1, 0.5f)); function. :/