Update MaskRenderer.cs

Option to enable/disable layers.
This commit is contained in:
max 2021-03-08 14:33:46 +01:00
parent e94f11424f
commit 9cac72255c

View File

@ -119,6 +119,7 @@ namespace TAO.InteractiveMask
{ {
public static int LayerCount = 0; public static int LayerCount = 0;
public bool enabled = true;
public Type type = Type.Clear; public Type type = Type.Clear;
public Mask mask = new Mask(); public Mask mask = new Mask();
public Shader blit = null; public Shader blit = null;
@ -168,6 +169,11 @@ namespace TAO.InteractiveMask
public void Blit(RenderTexture source, RenderTexture target) public void Blit(RenderTexture source, RenderTexture target)
{ {
if (!enabled)
{
return;
}
switch (type) switch (type)
{ {
case Type.Clear: case Type.Clear: