1*c8dee2aaSAndroid Build Coastguard Workerstatic constexpr char SKSL_MINIFIED_sksl_shared[] = 2*c8dee2aaSAndroid Build Coastguard Worker"$pure $genType radians($genType degrees);$pure $genHType radians($genHType degrees" 3*c8dee2aaSAndroid Build Coastguard Worker");$pure $genType degrees($genType radians);$pure $genHType degrees($genHType" 4*c8dee2aaSAndroid Build Coastguard Worker" radians);$pure $genType sin($genType angle);$pure $genHType sin($genHType angle" 5*c8dee2aaSAndroid Build Coastguard Worker");$pure $genType cos($genType angle);$pure $genHType cos($genHType angle);$pure" 6*c8dee2aaSAndroid Build Coastguard Worker" $genType tan($genType angle);$pure $genHType tan($genHType angle);$pure $genType" 7*c8dee2aaSAndroid Build Coastguard Worker" asin($genType x);$pure $genHType asin($genHType x);$pure $genType acos($genType" 8*c8dee2aaSAndroid Build Coastguard Worker" x);$pure $genHType acos($genHType x);$pure $genType atan($genType y,$genType" 9*c8dee2aaSAndroid Build Coastguard Worker" x);$pure $genHType atan($genHType y,$genHType x);$pure $genType atan($genType" 10*c8dee2aaSAndroid Build Coastguard Worker" y_over_x);$pure $genHType atan($genHType y_over_x);$es3 $pure $genType sinh" 11*c8dee2aaSAndroid Build Coastguard Worker"($genType x);$es3 $pure $genHType sinh($genHType x);$es3 $pure $genType cosh" 12*c8dee2aaSAndroid Build Coastguard Worker"($genType x);$es3 $pure $genHType cosh($genHType x);$es3 $pure $genType tanh" 13*c8dee2aaSAndroid Build Coastguard Worker"($genType x);$es3 $pure $genHType tanh($genHType x);$es3 $pure $genType asinh" 14*c8dee2aaSAndroid Build Coastguard Worker"($genType x);$es3 $pure $genHType asinh($genHType x);$es3 $pure $genType acosh" 15*c8dee2aaSAndroid Build Coastguard Worker"($genType x);$es3 $pure $genHType acosh($genHType x);$es3 $pure $genType atanh" 16*c8dee2aaSAndroid Build Coastguard Worker"($genType x);$es3 $pure $genHType atanh($genHType x);$pure $genType pow($genType" 17*c8dee2aaSAndroid Build Coastguard Worker" x,$genType y);$pure $genHType pow($genHType x,$genHType y);$pure $genType exp" 18*c8dee2aaSAndroid Build Coastguard Worker"($genType x);$pure $genHType exp($genHType x);$pure $genType log($genType x" 19*c8dee2aaSAndroid Build Coastguard Worker");$pure $genHType log($genHType x);$pure $genType exp2($genType x);$pure $genHType" 20*c8dee2aaSAndroid Build Coastguard Worker" exp2($genHType x);$pure $genType log2($genType x);$pure $genHType log2($genHType" 21*c8dee2aaSAndroid Build Coastguard Worker" x);$pure $genType sqrt($genType x);$pure $genHType sqrt($genHType x);$pure" 22*c8dee2aaSAndroid Build Coastguard Worker" $genType inversesqrt($genType x);$pure $genHType inversesqrt($genHType x);" 23*c8dee2aaSAndroid Build Coastguard Worker"$pure $genType abs($genType x);$pure $genHType abs($genHType x);$pure $genType" 24*c8dee2aaSAndroid Build Coastguard Worker" sign($genType x);$pure $genHType sign($genHType x);$pure $genType floor($genType" 25*c8dee2aaSAndroid Build Coastguard Worker" x);$pure $genHType floor($genHType x);$pure $genType ceil($genType x);$pure" 26*c8dee2aaSAndroid Build Coastguard Worker" $genHType ceil($genHType x);$pure $genType fract($genType x);$pure $genHType" 27*c8dee2aaSAndroid Build Coastguard Worker" fract($genHType x);$pure $genType mod($genType x,float y);$pure $genType mod" 28*c8dee2aaSAndroid Build Coastguard Worker"($genType x,$genType y);$pure $genHType mod($genHType x,half y);$pure $genHType" 29*c8dee2aaSAndroid Build Coastguard Worker" mod($genHType x,$genHType y);$pure $genType min($genType x,$genType y);$pure" 30*c8dee2aaSAndroid Build Coastguard Worker" $genType min($genType x,float y);$pure $genHType min($genHType x,$genHType" 31*c8dee2aaSAndroid Build Coastguard Worker" y);$pure $genHType min($genHType x,half y);$pure $genType max($genType x,$genType" 32*c8dee2aaSAndroid Build Coastguard Worker" y);$pure $genType max($genType x,float y);$pure $genHType max($genHType x," 33*c8dee2aaSAndroid Build Coastguard Worker"$genHType y);$pure $genHType max($genHType x,half y);$pure $genType clamp($genType" 34*c8dee2aaSAndroid Build Coastguard Worker" x,$genType minVal,$genType maxVal);$pure $genType clamp($genType x,float minVal" 35*c8dee2aaSAndroid Build Coastguard Worker",float maxVal);$pure $genHType clamp($genHType x,$genHType minVal,$genHType" 36*c8dee2aaSAndroid Build Coastguard Worker" maxVal);$pure $genHType clamp($genHType x,half minVal,half maxVal);$pure $genType" 37*c8dee2aaSAndroid Build Coastguard Worker" saturate($genType x);$pure $genHType saturate($genHType x);$pure $genType mix" 38*c8dee2aaSAndroid Build Coastguard Worker"($genType x,$genType y,$genType a);$pure $genType mix($genType x,$genType y" 39*c8dee2aaSAndroid Build Coastguard Worker",float a);$pure $genHType mix($genHType x,$genHType y,$genHType a);$pure $genHType" 40*c8dee2aaSAndroid Build Coastguard Worker" mix($genHType x,$genHType y,half a);$pure $genType step($genType edge,$genType" 41*c8dee2aaSAndroid Build Coastguard Worker" x);$pure $genType step(float edge,$genType x);$pure $genHType step($genHType" 42*c8dee2aaSAndroid Build Coastguard Worker" edge,$genHType x);$pure $genHType step(half edge,$genHType x);$pure $genType" 43*c8dee2aaSAndroid Build Coastguard Worker" smoothstep($genType edge0,$genType edge1,$genType x);$pure $genType smoothstep" 44*c8dee2aaSAndroid Build Coastguard Worker"(float edge0,float edge1,$genType x);$pure $genHType smoothstep($genHType edge0" 45*c8dee2aaSAndroid Build Coastguard Worker",$genHType edge1,$genHType x);$pure $genHType smoothstep(half edge0,half edge1" 46*c8dee2aaSAndroid Build Coastguard Worker",$genHType x);$es3 $pure $genIType abs($genIType x);$es3 $pure $genIType sign" 47*c8dee2aaSAndroid Build Coastguard Worker"($genIType x);$es3 $pure $genIType floatBitsToInt($genType value);$es3 $pure" 48*c8dee2aaSAndroid Build Coastguard Worker" $genUType floatBitsToUint($genType value);$es3 $pure $genType intBitsToFloat" 49*c8dee2aaSAndroid Build Coastguard Worker"($genIType value);$es3 $pure $genType uintBitsToFloat($genUType value);$es3" 50*c8dee2aaSAndroid Build Coastguard Worker" $pure $genType trunc($genType x);$es3 $pure $genHType trunc($genHType x);$es3" 51*c8dee2aaSAndroid Build Coastguard Worker" $pure $genType round($genType x);$es3 $pure $genHType round($genHType x);$es3" 52*c8dee2aaSAndroid Build Coastguard Worker" $pure $genType roundEven($genType x);$es3 $pure $genHType roundEven($genHType" 53*c8dee2aaSAndroid Build Coastguard Worker" x);$es3 $pure $genIType min($genIType x,$genIType y);$es3 $pure $genIType min" 54*c8dee2aaSAndroid Build Coastguard Worker"($genIType x,int y);$es3 $pure $genUType min($genUType x,$genUType y);$es3 $pure" 55*c8dee2aaSAndroid Build Coastguard Worker" $genUType min($genUType x,uint y);$es3 $pure $genIType max($genIType x,$genIType" 56*c8dee2aaSAndroid Build Coastguard Worker" y);$es3 $pure $genIType max($genIType x,int y);$es3 $pure $genUType max($genUType" 57*c8dee2aaSAndroid Build Coastguard Worker" x,$genUType y);$es3 $pure $genUType max($genUType x,uint y);$es3 $pure $genIType" 58*c8dee2aaSAndroid Build Coastguard Worker" clamp($genIType x,$genIType minVal,$genIType maxVal);$es3 $pure $genIType clamp" 59*c8dee2aaSAndroid Build Coastguard Worker"($genIType x,int minVal,int maxVal);$es3 $pure $genUType clamp($genUType x," 60*c8dee2aaSAndroid Build Coastguard Worker"$genUType minVal,$genUType maxVal);$es3 $pure $genUType clamp($genUType x,uint" 61*c8dee2aaSAndroid Build Coastguard Worker" minVal,uint maxVal);$es3 $pure $genType mix($genType x,$genType y,$genBType" 62*c8dee2aaSAndroid Build Coastguard Worker" a);$es3 $pure $genHType mix($genHType x,$genHType y,$genBType a);$es3 $pure" 63*c8dee2aaSAndroid Build Coastguard Worker" $genBType isnan($genType x);$es3 $pure $genBType isnan($genHType x);$es3 $pure" 64*c8dee2aaSAndroid Build Coastguard Worker" $genBType isinf($genType x);$es3 $pure $genBType isinf($genHType x);$es3 $genType" 65*c8dee2aaSAndroid Build Coastguard Worker" modf($genType x,out $genType i);$es3 $genHType modf($genHType x,out $genHType" 66*c8dee2aaSAndroid Build Coastguard Worker" i);$es3 $pure uint packUnorm2x16(float2 v);$es3 $pure float2 unpackUnorm2x16" 67*c8dee2aaSAndroid Build Coastguard Worker"(uint p);$pure float length($genType x);$pure half length($genHType x);$pure" 68*c8dee2aaSAndroid Build Coastguard Worker" float distance($genType p0,$genType p1);$pure half distance($genHType p0,$genHType" 69*c8dee2aaSAndroid Build Coastguard Worker" p1);$pure float dot($genType x,$genType y);$pure half dot($genHType x,$genHType" 70*c8dee2aaSAndroid Build Coastguard Worker" y);$pure float3 cross(float3 x,float3 y);$pure half3 cross(half3 x,half3 y" 71*c8dee2aaSAndroid Build Coastguard Worker");$pure $genType normalize($genType x);$pure $genHType normalize($genHType x" 72*c8dee2aaSAndroid Build Coastguard Worker");$pure $genType faceforward($genType N,$genType I,$genType Nref);$pure $genHType" 73*c8dee2aaSAndroid Build Coastguard Worker" faceforward($genHType N,$genHType I,$genHType Nref);$pure $genType reflect" 74*c8dee2aaSAndroid Build Coastguard Worker"($genType I,$genType N);$pure $genHType reflect($genHType I,$genHType N);$pure" 75*c8dee2aaSAndroid Build Coastguard Worker" $genType refract($genType I,$genType N,float eta);$pure $genHType refract(" 76*c8dee2aaSAndroid Build Coastguard Worker"$genHType I,$genHType N,half eta);$pure $squareMat matrixCompMult($squareMat" 77*c8dee2aaSAndroid Build Coastguard Worker" x,$squareMat y);$pure $squareHMat matrixCompMult($squareHMat x,$squareHMat" 78*c8dee2aaSAndroid Build Coastguard Worker" y);$es3 $pure $mat matrixCompMult($mat x,$mat y);$es3 $pure $hmat matrixCompMult" 79*c8dee2aaSAndroid Build Coastguard Worker"($hmat x,$hmat y);$pure $squareMat inverse($squareMat m);$pure $squareHMat inverse" 80*c8dee2aaSAndroid Build Coastguard Worker"($squareHMat m);$es3 $pure float determinant($squareMat m);$es3 $pure half determinant" 81*c8dee2aaSAndroid Build Coastguard Worker"($squareHMat m);$es3 $pure $squareMat transpose($squareMat m);$es3 $pure $squareHMat" 82*c8dee2aaSAndroid Build Coastguard Worker" transpose($squareHMat m);$es3 $pure float2x3 transpose(float3x2 m);$es3 $pure" 83*c8dee2aaSAndroid Build Coastguard Worker" half2x3 transpose(half3x2 m);$es3 $pure float2x4 transpose(float4x2 m);$es3" 84*c8dee2aaSAndroid Build Coastguard Worker" $pure half2x4 transpose(half4x2 m);$es3 $pure float3x2 transpose(float2x3 m" 85*c8dee2aaSAndroid Build Coastguard Worker");$es3 $pure half3x2 transpose(half2x3 m);$es3 $pure float3x4 transpose(float4x3" 86*c8dee2aaSAndroid Build Coastguard Worker" m);$es3 $pure half3x4 transpose(half4x3 m);$es3 $pure float4x2 transpose(float2x4" 87*c8dee2aaSAndroid Build Coastguard Worker" m);$es3 $pure half4x2 transpose(half2x4 m);$es3 $pure float4x3 transpose(float3x4" 88*c8dee2aaSAndroid Build Coastguard Worker" m);$es3 $pure half4x3 transpose(half3x4 m);$es3 $pure $squareMat outerProduct" 89*c8dee2aaSAndroid Build Coastguard Worker"($vec c,$vec r);$es3 $pure $squareHMat outerProduct($hvec c,$hvec r);$es3 $pure" 90*c8dee2aaSAndroid Build Coastguard Worker" float2x3 outerProduct(float3 c,float2 r);$es3 $pure half2x3 outerProduct(half3" 91*c8dee2aaSAndroid Build Coastguard Worker" c,half2 r);$es3 $pure float3x2 outerProduct(float2 c,float3 r);$es3 $pure half3x2" 92*c8dee2aaSAndroid Build Coastguard Worker" outerProduct(half2 c,half3 r);$es3 $pure float2x4 outerProduct(float4 c,float2" 93*c8dee2aaSAndroid Build Coastguard Worker" r);$es3 $pure half2x4 outerProduct(half4 c,half2 r);$es3 $pure float4x2 outerProduct" 94*c8dee2aaSAndroid Build Coastguard Worker"(float2 c,float4 r);$es3 $pure half4x2 outerProduct(half2 c,half4 r);$es3 $pure" 95*c8dee2aaSAndroid Build Coastguard Worker" float3x4 outerProduct(float4 c,float3 r);$es3 $pure half3x4 outerProduct(half4" 96*c8dee2aaSAndroid Build Coastguard Worker" c,half3 r);$es3 $pure float4x3 outerProduct(float3 c,float4 r);$es3 $pure half4x3" 97*c8dee2aaSAndroid Build Coastguard Worker" outerProduct(half3 c,half4 r);$pure $bvec lessThan($vec x,$vec y);$pure $bvec" 98*c8dee2aaSAndroid Build Coastguard Worker" lessThan($hvec x,$hvec y);$pure $bvec lessThan($ivec x,$ivec y);$pure $bvec" 99*c8dee2aaSAndroid Build Coastguard Worker" lessThan($svec x,$svec y);$pure $bvec lessThanEqual($vec x,$vec y);$pure $bvec" 100*c8dee2aaSAndroid Build Coastguard Worker" lessThanEqual($hvec x,$hvec y);$pure $bvec lessThanEqual($ivec x,$ivec y);" 101*c8dee2aaSAndroid Build Coastguard Worker"$pure $bvec lessThanEqual($svec x,$svec y);$pure $bvec greaterThan($vec x,$vec" 102*c8dee2aaSAndroid Build Coastguard Worker" y);$pure $bvec greaterThan($hvec x,$hvec y);$pure $bvec greaterThan($ivec x" 103*c8dee2aaSAndroid Build Coastguard Worker",$ivec y);$pure $bvec greaterThan($svec x,$svec y);$pure $bvec greaterThanEqual" 104*c8dee2aaSAndroid Build Coastguard Worker"($vec x,$vec y);$pure $bvec greaterThanEqual($hvec x,$hvec y);$pure $bvec greaterThanEqual" 105*c8dee2aaSAndroid Build Coastguard Worker"($ivec x,$ivec y);$pure $bvec greaterThanEqual($svec x,$svec y);$pure $bvec" 106*c8dee2aaSAndroid Build Coastguard Worker" equal($vec x,$vec y);$pure $bvec equal($hvec x,$hvec y);$pure $bvec equal(" 107*c8dee2aaSAndroid Build Coastguard Worker"$ivec x,$ivec y);$pure $bvec equal($svec x,$svec y);$pure $bvec equal($bvec" 108*c8dee2aaSAndroid Build Coastguard Worker" x,$bvec y);$pure $bvec notEqual($vec x,$vec y);$pure $bvec notEqual($hvec x" 109*c8dee2aaSAndroid Build Coastguard Worker",$hvec y);$pure $bvec notEqual($ivec x,$ivec y);$pure $bvec notEqual($svec x" 110*c8dee2aaSAndroid Build Coastguard Worker",$svec y);$pure $bvec notEqual($bvec x,$bvec y);$es3 $pure $bvec lessThan($usvec" 111*c8dee2aaSAndroid Build Coastguard Worker" x,$usvec y);$es3 $pure $bvec lessThan($uvec x,$uvec y);$es3 $pure $bvec lessThanEqual" 112*c8dee2aaSAndroid Build Coastguard Worker"($uvec x,$uvec y);$es3 $pure $bvec lessThanEqual($usvec x,$usvec y);$es3 $pure" 113*c8dee2aaSAndroid Build Coastguard Worker" $bvec greaterThan($uvec x,$uvec y);$es3 $pure $bvec greaterThan($usvec x,$usvec" 114*c8dee2aaSAndroid Build Coastguard Worker" y);$es3 $pure $bvec greaterThanEqual($uvec x,$uvec y);$es3 $pure $bvec greaterThanEqual" 115*c8dee2aaSAndroid Build Coastguard Worker"($usvec x,$usvec y);$es3 $pure $bvec equal($uvec x,$uvec y);$es3 $pure $bvec" 116*c8dee2aaSAndroid Build Coastguard Worker" equal($usvec x,$usvec y);$es3 $pure $bvec notEqual($uvec x,$uvec y);$es3 $pure" 117*c8dee2aaSAndroid Build Coastguard Worker" $bvec notEqual($usvec x,$usvec y);$pure bool any($bvec x);$pure bool all($bvec" 118*c8dee2aaSAndroid Build Coastguard Worker" x);$pure $bvec not($bvec x);$es3 $pure $genType dFdx($genType p);$es3 $pure" 119*c8dee2aaSAndroid Build Coastguard Worker" $genType dFdy($genType p);$es3 $pure $genHType dFdx($genHType p);$es3 $pure" 120*c8dee2aaSAndroid Build Coastguard Worker" $genHType dFdy($genHType p);$es3 $pure $genType fwidth($genType p);$es3 $pure" 121*c8dee2aaSAndroid Build Coastguard Worker" $genHType fwidth($genHType p);$pure half4 unpremul(half4 color){return half4" 122*c8dee2aaSAndroid Build Coastguard Worker"(color.xyz/max(color.w,.0001),color.w);}$pure float4 unpremul(float4 color)" 123*c8dee2aaSAndroid Build Coastguard Worker"{return float4(color.xyz/max(color.w,.0001),color.w);}$export $pure half4 $unpremul_polar" 124*c8dee2aaSAndroid Build Coastguard Worker"(half4 color){return half4(color.x,color.yz/max(color.w,.0001),color.w);}$export" 125*c8dee2aaSAndroid Build Coastguard Worker" $pure half4 $rgb_to_hsl(half3 c,half a){half4 p=c.y<c.z?half4(c.zy,-1.,.6666667" 126*c8dee2aaSAndroid Build Coastguard Worker"):half4(c.yz,0.,-.333333343);half4 q=c.x<p.x?half4(p.x,c.x,p.yw):half4(c.x," 127*c8dee2aaSAndroid Build Coastguard Worker"p.x,p.yz);const half kEps=.0001;half pmV=q.x;half pmC=pmV-min(q.y,q.z);half" 128*c8dee2aaSAndroid Build Coastguard Worker" pmL=pmV-pmC*.5;half H=abs(q.w+(q.y-q.z)/(pmC*6.+kEps));half S=pmC/((a+kEps" 129*c8dee2aaSAndroid Build Coastguard Worker")-abs(pmL*2.-a));half L=pmL/(a+kEps);return half4(H,S,L,a);}$export $pure half3" 130*c8dee2aaSAndroid Build Coastguard Worker" $hsl_to_rgb(half3 hsl){half C=(1.-abs(2.*hsl.z-1.))*hsl.y;half3 p=hsl.xxx+" 131*c8dee2aaSAndroid Build Coastguard Worker"half3(0.,.6666667,.333333343);half3 q=saturate(abs(fract(p)*6.-3.)-1.);return" 132*c8dee2aaSAndroid Build Coastguard Worker"(q-.5)*C+hsl.z;}$export $pure half4 $hsl_to_rgb(half3 hsl,half a){return saturate" 133*c8dee2aaSAndroid Build Coastguard Worker"(half4($hsl_to_rgb(hsl)*a,a));}$export $pure half3 $css_lab_to_xyz(half3 lab" 134*c8dee2aaSAndroid Build Coastguard Worker"){const half e=.008856452;half3 f;f.y=(lab.x+16.)*.00862069;f.x=lab.y*.002+" 135*c8dee2aaSAndroid Build Coastguard Worker"f.y;f.z=f.y-lab.z*.005;half3 f_cubed=pow(f,half3(3.));half3 xyz=half3(f_cubed" 136*c8dee2aaSAndroid Build Coastguard Worker".x>e?f_cubed.x:(116.*f.x-16.)*.00110705639,lab.x>8.000001?f_cubed.y:lab.x*.00110705639" 137*c8dee2aaSAndroid Build Coastguard Worker",f_cubed.z>e?f_cubed.z:(116.*f.z-16.)*.00110705639);const half3 D50=half3(.9642956" 138*c8dee2aaSAndroid Build Coastguard Worker",1.,.825104535);return xyz*D50;}$pure half3 $css_hcl_to_lab(half3 hcl){return" 139*c8dee2aaSAndroid Build Coastguard Worker" half3(hcl.z,hcl.y*cos(radians(hcl.x)),hcl.y*sin(radians(hcl.x)));}$export $pure" 140*c8dee2aaSAndroid Build Coastguard Worker" half3 $css_hcl_to_xyz(half3 hcl){return $css_lab_to_xyz($css_hcl_to_lab(hcl" 141*c8dee2aaSAndroid Build Coastguard Worker"));}$export $pure half3 $css_oklab_to_linear_srgb(half3 oklab){half l_=(oklab" 142*c8dee2aaSAndroid Build Coastguard Worker".x+.396337777*oklab.y)+.215803757*oklab.z;half m_=(oklab.x-.105561346*oklab" 143*c8dee2aaSAndroid Build Coastguard Worker".y)-.06385417*oklab.z;half s_=(oklab.x-.08948418*oklab.y)-1.29148555*oklab." 144*c8dee2aaSAndroid Build Coastguard Worker"z;half l=(l_*l_)*l_;half m=(m_*m_)*m_;half s=(s_*s_)*s_;return half3((4.0767417" 145*c8dee2aaSAndroid Build Coastguard Worker"*l-3.3077116*m)+.230969936*s,(-1.268438*l+2.60975742*m)-.341319382*s,(-.00419608643" 146*c8dee2aaSAndroid Build Coastguard Worker"*l-.7034186*m)+1.70761466*s);}$export $pure half3 $css_okhcl_to_linear_srgb" 147*c8dee2aaSAndroid Build Coastguard Worker"(half3 okhcl){return $css_oklab_to_linear_srgb($css_hcl_to_lab(okhcl));}$export" 148*c8dee2aaSAndroid Build Coastguard Worker" $pure half3 $css_oklab_gamut_map_to_linear_srgb(half3 oklab){const half2 normal_R" 149*c8dee2aaSAndroid Build Coastguard Worker"=half2(.409702,-.912219);const half2 normal_M=half2(-.397919,-.917421);const" 150*c8dee2aaSAndroid Build Coastguard Worker" half2 normal_B=half2(-.9068,.421562);const half2 normal_C=half2(-.171122,.98525" 151*c8dee2aaSAndroid Build Coastguard Worker");const half2 normal_G=half2(.460276,.887776);const half2 normal_Y=half2(.947925" 152*c8dee2aaSAndroid Build Coastguard Worker",.318495);const half c0_YR=.091132;const half2 cW_YR=half2(.07037,.034139);" 153*c8dee2aaSAndroid Build Coastguard Worker"const half2 cK_YR=half2(.01817,.37855);const half c0_RM=.113902;const half2" 154*c8dee2aaSAndroid Build Coastguard Worker" cW_RM=half2(.090836,.036251);const half2 cK_RM=half2(.226781,.018764);const" 155*c8dee2aaSAndroid Build Coastguard Worker" half c0_MB=.161739;const half2 cW_MB=half2(-.008202,-.264819);const half2 cK_MB" 156*c8dee2aaSAndroid Build Coastguard Worker"=half2(.187156,-.284304);const half c0_BC=.102047;const half2 cW_BC=half2(-" 157*c8dee2aaSAndroid Build Coastguard Worker".014804,-.162608);const half2 cK_BC=half2(-.276786,.004193);const half c0_CG" 158*c8dee2aaSAndroid Build Coastguard Worker"=.092029;const half2 cW_CG=half2(-.038533,-.00165);const half2 cK_CG=half2(" 159*c8dee2aaSAndroid Build Coastguard Worker"-.232572,-.094331);const half c0_GY=.081709;const half2 cW_GY=half2(-.034601" 160*c8dee2aaSAndroid Build Coastguard Worker",-.002215);const half2 cK_GY=half2(.012185,.338031);half2 ab=oklab.yz;half c0" 161*c8dee2aaSAndroid Build Coastguard Worker";half2 cW;half2 cK;if(dot(ab,normal_R)<0.)if(dot(ab,normal_G)<0.)if(dot(ab," 162*c8dee2aaSAndroid Build Coastguard Worker"normal_C)<0.){c0=c0_BC;cW=cW_BC;cK=cK_BC;}else{c0=c0_CG;cW=cW_CG;cK=cK_CG;}" 163*c8dee2aaSAndroid Build Coastguard Worker"else if(dot(ab,normal_Y)<0.){c0=c0_GY;cW=cW_GY;cK=cK_GY;}else{c0=c0_YR;cW=cW_YR" 164*c8dee2aaSAndroid Build Coastguard Worker";cK=cK_YR;}else if(dot(ab,normal_B)<0.)if(dot(ab,normal_M)<0.){c0=c0_RM;cW=" 165*c8dee2aaSAndroid Build Coastguard Worker"cW_RM;cK=cK_RM;}else{c0=c0_MB;cW=cW_MB;cK=cK_MB;}else{c0=c0_BC;cW=cW_BC;cK=" 166*c8dee2aaSAndroid Build Coastguard Worker"cK_BC;}half alpha=1.;half w_denom=dot(cW,ab);if(w_denom>0.){half one_minus_L" 167*c8dee2aaSAndroid Build Coastguard Worker"=1.-oklab.x;half w_num=c0*one_minus_L;if(w_num<w_denom)alpha=min(alpha,w_num" 168*c8dee2aaSAndroid Build Coastguard Worker"/w_denom);}half k_denom=dot(cK,ab);if(k_denom>0.){half L=oklab.x;half k_num" 169*c8dee2aaSAndroid Build Coastguard Worker"=c0*L;if(k_num<k_denom)alpha=min(alpha,k_num/k_denom);}oklab.yz*=alpha;return" 170*c8dee2aaSAndroid Build Coastguard Worker" $css_oklab_to_linear_srgb(oklab);}$export $pure half3 $css_okhcl_gamut_map_to_linear_srgb" 171*c8dee2aaSAndroid Build Coastguard Worker"(half3 okhcl){return $css_oklab_gamut_map_to_linear_srgb($css_hcl_to_lab(okhcl" 172*c8dee2aaSAndroid Build Coastguard Worker"));}$export $pure half3 $css_hsl_to_srgb(half3 hsl){hsl.x=mod(hsl.x,360.);if" 173*c8dee2aaSAndroid Build Coastguard Worker"(hsl.x<0.)hsl.x+=360.;hsl.yz*=.01;half3 k=mod(half3(0.,8.,4.)+hsl.x*.0333333351" 174*c8dee2aaSAndroid Build Coastguard Worker",12.);half a=hsl.y*min(hsl.z,1.-hsl.z);return hsl.z-a*clamp(min(k-3.,9.-k)," 175*c8dee2aaSAndroid Build Coastguard Worker"-1.,1.);}$export $pure half3 $css_hwb_to_srgb(half3 hwb){half3 rgb;hwb.yz*=" 176*c8dee2aaSAndroid Build Coastguard Worker".01;if(hwb.y+hwb.z>=1.)rgb=(hwb.y/(hwb.y+hwb.z)).xxx;else{rgb=$css_hsl_to_srgb" 177*c8dee2aaSAndroid Build Coastguard Worker"(half3(hwb.x,100.,50.));rgb*=(1.-hwb.y)-hwb.z;rgb+=hwb.y;}return rgb;}$export" 178*c8dee2aaSAndroid Build Coastguard Worker" $pure half4 $interpolated_to_rgb_unpremul(half4 color,int colorSpace,int doUnpremul" 179*c8dee2aaSAndroid Build Coastguard Worker"){if(bool(doUnpremul))switch(colorSpace){case 2:;case 3:;case 4:color=unpremul" 180*c8dee2aaSAndroid Build Coastguard Worker"(color);break;case 5:;case 6:;case 7:;case 9:;case 10:color=$unpremul_polar" 181*c8dee2aaSAndroid Build Coastguard Worker"(color);break;}switch(colorSpace){case 2:color.xyz=$css_lab_to_xyz(color.xyz" 182*c8dee2aaSAndroid Build Coastguard Worker");break;case 3:color.xyz=$css_oklab_to_linear_srgb(color.xyz);break;case 4:" 183*c8dee2aaSAndroid Build Coastguard Worker"color.xyz=$css_oklab_gamut_map_to_linear_srgb(color.xyz);break;case 5:color" 184*c8dee2aaSAndroid Build Coastguard Worker".xyz=$css_hcl_to_xyz(color.xyz);break;case 6:color.xyz=$css_okhcl_to_linear_srgb" 185*c8dee2aaSAndroid Build Coastguard Worker"(color.xyz);break;case 7:color.xyz=$css_okhcl_gamut_map_to_linear_srgb(color" 186*c8dee2aaSAndroid Build Coastguard Worker".xyz);break;case 9:color.xyz=$css_hsl_to_srgb(color.xyz);break;case 10:color" 187*c8dee2aaSAndroid Build Coastguard Worker".xyz=$css_hwb_to_srgb(color.xyz);break;}return color;}"; 188