Shader "Color Space/YCrCbtoRGB Chroma Key" {
Properties {
 _YTex ("Y (RGB)", 2D) = "white" {}
 _CrTex ("Cr (RGB)", 2D) = "white" {}
 _CbTex ("Cb (RGB)", 2D) = "white" {}
 _KeyYCrCb ("Key Color YCrCb", Vector) = (0,0,0,-0.6)
 _KeyScale ("Comparison Scale", Vector) = (0.2,1,1,4.5)
}
SubShader { 
 Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
 Pass {
  Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
  ZWrite Off
  Fog {
   Color (0,0,0,0)
  }
  Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES
					#define SHADER_API_GLES 1
					#define tex2D texture2D


					#ifdef VERTEX
					#define gl_ModelViewProjectionMatrix glstate_matrix_mvp
					uniform mat4 glstate_matrix_mvp;

					varying mediump vec2 xlv_TEXCOORD1;
					varying mediump vec2 xlv_TEXCOORD0;

					uniform highp vec4 _YTex_ST;
					uniform highp vec4 _CbTex_ST;
					attribute vec4 _glesMultiTexCoord0;
					attribute vec4 _glesVertex;
					void main ()
					{
						mediump vec2 tmpvar_1;
						mediump vec2 tmpvar_2;
						highp vec2 tmpvar_3;
						tmpvar_3 = ((_glesMultiTexCoord0.xy * _YTex_ST.xy) + _YTex_ST.zw);
						tmpvar_1 = tmpvar_3;
						highp vec2 tmpvar_4;
						tmpvar_4 = ((_glesMultiTexCoord0.xy * _CbTex_ST.xy) + _CbTex_ST.zw);
						tmpvar_2 = tmpvar_4;
						gl_Position = (gl_ModelViewProjectionMatrix * _glesVertex);
						xlv_TEXCOORD0 = tmpvar_1;
						xlv_TEXCOORD1 = tmpvar_2;
					}



					#endif
					#ifdef FRAGMENT

					varying mediump vec2 xlv_TEXCOORD1;
					varying mediump vec2 xlv_TEXCOORD0;
					uniform sampler2D _YTex;
					uniform mediump vec4 _KeyYCrCb;
					uniform mediump vec4 _KeyScale;
					uniform sampler2D _CrTex;
					uniform sampler2D _CbTex;
					void main ()
					{
						lowp vec4 rgbVec;
						lowp vec4 tmpvar_1;
						tmpvar_1.w = 1.0;
						tmpvar_1.x = texture2D (_YTex, xlv_TEXCOORD0).x;
						tmpvar_1.y = texture2D (_CrTex, xlv_TEXCOORD1).y;
						tmpvar_1.z = texture2D (_CbTex, xlv_TEXCOORD1).z;
						rgbVec.x = dot (vec4(1.16438, 0.0, 1.59603, -0.870785), tmpvar_1);
						rgbVec.y = dot (vec4(1.16438, -0.391762, -0.812969, 0.529594), tmpvar_1);
						rgbVec.z = dot (vec4(1.16438, 2.01723, 0.0, -1.08139), tmpvar_1);
						mediump float tmpvar_2;
						tmpvar_2 = ((length (((tmpvar_1.xyz - _KeyYCrCb.xyz) * _KeyScale.xyz)) + _KeyYCrCb.w) * _KeyScale.w);
						rgbVec.w = tmpvar_2;
						gl_FragData[0] = rgbVec;
					}

					#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
 }
}
}