2D Toolkit Forum
2D Toolkit => Support => Topic started by: fezon aimed on April 02, 2014, 08:00:31 am
-
Hi,
I am using depth mask with the shader given below.
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 On
Blend SrcAlpha OneMinusSrcAlpha
AlphaTest GEqual [_Cutoff]
ColorMask 0
Pass
{
SetTexture [_Mask] {combine texture}
SetTexture [_MainTex] {combine texture, previous}
}
}
}
Its working perfect on Samsung Galaxy S2 , Samsung Galaxy S3, Google Nexus Tab but its not working on Samsung Galaxy Tab 2 10.1. Its just giving me white image as a mask. I am using a .png image as texture for masking. Kindly help me to resolve this issue. Thanx in Advance.
Regards,
Fezon
-
Hi,
This sounds very much like a Unity issue, but I don't know what this shader is meant to do. This shader has ColorMask 0, which means it should not write ANY colour information.
-
Thanx for reply..
Yes depth mask dont have any color. It will transparent the area where depth mask will be attached.
-
Yes but if its writing out white, then its an issue with Unity not respecting the ColorWrite property. You should post this on unity answers / forums.