- Home /
Question by
rawatenator · Apr 22, 2012 at 09:53 PM ·
shadertexturerenderingtransparencyshading
Shader Question about Alpha
I want to make a shader that uses two passes to render an object. I want the results from the second pass to be rendered so that they are slightly transparent(some alpha), where that alpha can be varied by a slider in the unity editor.
Please suggest how to do this.
Current Shader:
Shader "Examples/2 Alpha Blended Textures" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
//_BlendTex ("Alpha Blended (RGBA) ", 2D) = "white" {}
}
SubShader {
Pass {
Cull Front
// Apply base texture
SetTexture [_MainTex] {
combine texture
}
}
Pass {
Cull Back
// Apply base texture
SetTexture [_MainTex] {
combine texture
}
}
}
FallBack "Diffuse"
}
Comment
Can you post your existing shader? It'll be easier to explain if I show you what parts need to be changed (Since I don't know how close you are already).