- Home /
Depth Mask with Blending Edge
I´m trying to get blended/ fading edges from a Mask. Using this modified version off the depth mask shader (source wiki)I can get the alpha/ blending information on the mask to control the diameter off the mask (base Alpha Cutoff):
Shader "Transparent/Mask" {
// by moffatjason.
Properties
{
_MainTex ("Base (RGB) Alpha (A)", 2D) = "white" {}
_Cutoff ("Base Alpha cutoff", Range (0,.9)) = .5
}
SubShader {
// Render the mask after regular geometry, but before masked geometry and
// transparent things.
Tags {"Queue" = "Geometry+10"}
// Don't draw in the RGBA channels; just the depth buffer
ColorMask 0
ZWrite On
Pass
{
AlphaTest LEqual [_Cutoff]
SetTexture [_MainTex] {
combine texture * primary, texture
}
}
}
}
..But Im trying to get Blending/ Fading edges instead of the solid cut i´m getting. How can i get this blending effect?
PS: Thread in Unity forum with images.
Comment
sorry this is a duplicate question. Was not aware that the original question was waiting approval. Please disregard.
Your answer
Follow this Question
Related Questions
Depth Mask with Blending Edge 1 Answer
Animation Problem 4 Answers
8-Way Animation Blending 2 Answers
3 texture blend shader 2 Answers
Texture blending 0 Answers