Hi Guys
I am not sure if this is even possible, but is there a way to use a pure Vertex Color shader but have the ability to “Fade” the object (or change its transparency). I can’t find a way to have the alpha set to say 0.5 to have the object semi transparent.
Please note I have no shader development skill and have tried merging lots of different solutions on the forum with this but cannot get it to work. Either the object completely disappears or it just doesn’t change.
Thanks in advance for any help
The shader I am using for my vertex colour shader is the one from codeanimo website (This seems to work great for what I want but just no alpha capability)
Properties{
_MainTex("Base (Lightmapping Only)", 2D) = "white" {}// If this doesn't exist, Beast Lightmapper will complain
}
SubShader{
LOD 100
Pass {
Tags { "LightMode" = "Vertex" }
ColorMaterial AmbientAndDiffuse
Lighting On
SeparateSpecular On
SetTexture [_MainTex] {
combine primary + primary DOUBLE
}
}
// Lightmapped, encoded as dLDR
Pass {
Tags { "LightMode" = "VertexLM" }
BindChannels {
Bind "Vertex", vertex
Bind "normal", normal
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
Bind "texcoord", texcoord1 // main uses 1st uv
}
SetTexture [unity_Lightmap] {
matrix [unity_LightmapMatrix]
combine texture
}
SetTexture [_MainTex] {
combine primary + previous DOUBLE, primary
}
}
// Lightmapped, encoded as RGBM
Pass {
Tags { "LightMode" = "VertexLMRGBM" }
BindChannels {
Bind "Vertex", vertex
Bind "normal", normal
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
Bind "texcoord1", texcoord1 // unused
Bind "texcoord", texcoord2 // main uses 1st uv
}
SetTexture [unity_Lightmap] {
matrix [unity_LightmapMatrix]
combine texture * texture alpha DOUBLE
}
SetTexture [_MainTex] {
combine previous QUAD, primary
}
}
}