Quantcast
Channel: Unity Alpha Diffuse Mask Shader - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Unity Alpha Diffuse Mask Shader

$
0
0

I am working in Unity, with the latest version of Unity 5.2.2 and I am asking, if it is possible to create an alpha mask shader that can fade the mask. Right now I have this shader

Shader "MaskedTexture"{   Properties   {      _MainTex ("Base (RGB)", 2D) = "white" {}      _Mask ("Culling Mask", 2D) = "white" {}      _Cutoff ("Alpha cutoff", Range (0,1)) = 0.1   }  SubShader  {      Tags {"Queue"="Transparent"}      Lighting Off      ZWrite Off      Blend SrcAlpha OneMinusSrcAlpha      AlphaTest GEqual [_Cutoff]  Pass  {     SetTexture [_Mask] {combine texture}     SetTexture [_MainTex] {combine texture, previous}  }  }}

enter image description here

I need to add a color propertie or something? What I want is to just fade this object away so that it is not visible anymore. I can't just disable it, it actually has to fade smoothly.

Thanks.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images