Hello Guest

Author Topic: UIDepth Mask not working on Samsung Galaxy Tab 2 10.1  (Read 3213 times)

fezon aimed

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
UIDepth Mask not working on Samsung Galaxy Tab 2 10.1
« 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

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: UIDepth Mask not working on Samsung Galaxy Tab 2 10.1
« Reply #1 on: April 02, 2014, 10:11:51 am »
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.

fezon aimed

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: UIDepth Mask not working on Samsung Galaxy Tab 2 10.1
« Reply #2 on: April 02, 2014, 12:41:55 pm »
Thanx for reply..
Yes depth mask dont have any color. It will transparent the area where depth mask will be attached.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: UIDepth Mask not working on Samsung Galaxy Tab 2 10.1
« Reply #3 on: April 02, 2014, 12:45:51 pm »
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.