Question by 
               leejinmyoung · Aug 10, 2020 at 09:58 AM · 
                shadermobilemobile devicesmobileoptimizationstencil  
              
 
              GPU does not support separate MRT blend modes!
Hi, I'm a game developer in Korea.
I want to use stencil in our mobile game, so I use a custom shader.
BUT I meet this message
"Shader is not supported : GPU does not support separate MRT blend modes."
Which script line should I change to use on mobile?(Some devices are active well.)
Or other way to using stencil on mobile?
This is the custom shader script.
 Properties
 {
     _Color ("Color", Color) = (1,1,1,1)
     _MainTex ("Texture", 2D) = "white" {}
     _CutOff("CutOff",Range(0,1)) = 0
 }
 SubShader
 {        
     LOD 100
     Blend SrcAlpha OneMinusSrcAlpha
     Tags { "Queue" = "Geometry-1" "RenderType"="Transparent"}  
     ColorMask RGB 0
     ZWrite Off
     Stencil
     {
         Ref 1
         Comp Always
         Pass Replace
     }
     Pass
     {
         CGPROGRAM
         #pragma vertex vert
         #pragma fragment frag
         
         #include "UnityCG.cginc"
         struct appdata
         {
             float4 vertex : POSITION;
             float2 uv : TEXCOORD0;
         };
         struct v2f
         {
             float2 uv : TEXCOORD0;
             float4 vertex : SV_POSITION;
         };
         sampler2D _MainTex;
         float4 _MainTex_ST;
         float _CutOff;
         fixed4 _Color;
         
         v2f vert (appdata v)
         {
             v2f o;
             o.vertex = UnityObjectToClipPos(v.vertex);                
             o.uv = TRANSFORM_TEX(v.uv, _MainTex);
             return o;
         }
         
         fixed4 frag (v2f i) : SV_Target
         {
             // sample the texture
             fixed4 col = tex2D(_MainTex, i.uv) * _Color;                
             float dissolve = step(col,_CutOff);
             clip(_CutOff-dissolve);
             return dissolve;
         }
         ENDCG
     }        
 }
 FallBack "Mobile/Diffuse"
 
               Thanks for your kindness.
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Custom Shader is Pink Only Samsung 2 Answers
Mobile Build laggy? 0 Answers
How to get the touch controls to work smooth and properly in FPS android gamemobile Game? 1 Answer
Problems with stencil / spawn objects @ stencil position 0 Answers
I need Help With Shader Vertex on Mobile i have shader both 0 Answers