Reflective Map Tint color problem

Hello, I am noob at shader writing. Take a look at shader:

Shader "MyAndroid/ShaderTest" 
{
	Properties 
	{
		_MainTex ("Main Texture", 2D) = "white" {}
		_MaskTex ("Mask Texture", 2D) = "white" {}
		_EnvMap ("Reflect Texture", 2D) = "white" {TexGen SphereMap}
		
		_TintColor ("Tint Color", Color) = (1,1,1,1)
	}
	SubShader 
	{
		Tags 
		{"Queue"="Transparent"}
		
		Pass
		{
			SetTexture [_MainTex] 
            {
              	combine texture * constant ConstantColor[_TintColor]
            }
            SetTexture [_MaskTex]
			{
				combine previous, texture
			}
			SetTexture [_EnvMap]
			{
				combine texture lerp(previous) previous
			}
		}
	} 
	FallBack "Mobile/Diffuse"
}

So I have a mask, the main texture, tint color and EnvMap. I want to multiply EnvMap with tintColor, but it doesn’t work.

Any info is appreciated :slight_smile:

I don’t understand why you’re not just using two materials. Doing the calculations for a more expensive shader everywhere, and another calculation for masking, which requires more data, seems like a bad and overly complex solution.

If you were going to mask, based on that shot, I’d use vertex colors instead of a texture.

And just invert your mask. There’s no point trying to correct for that in the shader when you can do it in the texture for free.