MaskShader translation.

Heya, I have this shader I used to use for masking textures back in Unity2x thanks to Eric5h5 and well… its 3 now so since I have the mental capacity of an infant when it comes to shaders and engrish I need halpz I know we have some gods in shader labs so I figured I’ll drop it off here.
Thanks! :slight_smile:

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}
      }
   }
}

EDIT : Sorry ladies wrong one :stuck_out_tongue: this is the one I was working with - the masking works however
thanks to my incoherency I am garbage at shaders and I cant even fathom changing _MainTex to RGBA alpha :confused:
Sorry…

Aye, I got it now…
it’s been hiding in front of me the whole time :stuck_out_tongue: - heres what I got

Shader "MaskTexture" {
	Properties{
		_Color ("Main Color", Color) = (1,1,1,0.5)
		_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
		_Mask ("Mix Mask (A)", 2D) = "white" {}
	}
	
	SubShader{
		Tags {Queue=Transparent}
		Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
		Blend SrcAlpha OneMinusSrcAlpha 
		
		Pass{    
			Material{
				Diffuse [_Color]
			}SetTexture [_MainTex]{
				constantColor [_Color]
				combine texture * constant, texture * constant
			}SetTexture [_Mask]{
				combine previous, texture
			}SetTexture [_MainTex]{
				combine previous * texture
			}
		}
	}
	FallBack " VertexLit", 1
}

for anyone else that’s having a similar problom…