mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-03 12:56:50 -05:00
654 lines
24 KiB
Text
654 lines
24 KiB
Text
#extension GL_EXT_shader_texture_lod : enable
|
|
lowp vec4 impl_low_texture2DLodEXT(lowp sampler2D sampler, highp vec2 coord, mediump float lod)
|
|
{
|
|
#if defined(GL_EXT_shader_texture_lod)
|
|
return texture2DLodEXT(sampler, coord, lod);
|
|
#else
|
|
return texture2D(sampler, coord, lod);
|
|
#endif
|
|
}
|
|
|
|
uniform sampler2D _MainTex;
|
|
uniform highp vec4 _MainTex_TexelSize;
|
|
varying highp vec2 xlv_TEXCOORD0;
|
|
void main ()
|
|
{
|
|
highp vec2 fxaaQualityRcpFrame_1;
|
|
fxaaQualityRcpFrame_1 = _MainTex_TexelSize.xy;
|
|
highp vec4 tmpvar_2;
|
|
highp float subpixH_3;
|
|
highp float pixelOffset_4;
|
|
highp float spanLengthRcp_5;
|
|
bool goodSpanP_6;
|
|
bool goodSpanN_7;
|
|
highp float dstP_8;
|
|
highp float dstN_9;
|
|
bool doneNP_10;
|
|
bool doneP_11;
|
|
bool doneN_12;
|
|
bool lumaMLTZero_13;
|
|
highp float subpixF_14;
|
|
highp float gradientScaled_15;
|
|
highp float lumaEndP_16;
|
|
highp float subpixE_17;
|
|
highp float lumaEndN_18;
|
|
highp float subpixD_19;
|
|
highp vec2 posP_20;
|
|
highp vec2 posN_21;
|
|
highp vec2 posB_22;
|
|
bool pairN_23;
|
|
highp float lumaSS_24;
|
|
highp float lumaNN_25;
|
|
highp float gradientS_26;
|
|
highp float gradientN_27;
|
|
highp float subpixB_28;
|
|
highp float subpixA_29;
|
|
bool horzSpan_30;
|
|
highp float lengthSign_31;
|
|
highp float lumaNWSW_32;
|
|
highp float lumaNESE_33;
|
|
highp float subpixRcpRange_34;
|
|
highp float lumaWE_35;
|
|
highp float lumaNS_36;
|
|
highp float range_37;
|
|
highp float lumaN_38;
|
|
highp float lumaS_39;
|
|
highp vec2 posM_40;
|
|
posM_40 = xlv_TEXCOORD0;
|
|
highp vec4 tmpvar_41;
|
|
lowp vec4 tmpvar_42;
|
|
tmpvar_42 = impl_low_texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0);
|
|
tmpvar_41 = tmpvar_42;
|
|
highp vec4 tmpvar_43;
|
|
tmpvar_43.zw = vec2(0.0, 0.0);
|
|
tmpvar_43.xy = (xlv_TEXCOORD0 + (vec2(0.0, 1.0) * _MainTex_TexelSize.xy));
|
|
highp vec4 tmpvar_44;
|
|
lowp vec4 tmpvar_45;
|
|
tmpvar_45 = impl_low_texture2DLodEXT (_MainTex, tmpvar_43.xy, 0.0);
|
|
tmpvar_44 = tmpvar_45;
|
|
lumaS_39 = tmpvar_44.w;
|
|
highp vec4 tmpvar_46;
|
|
tmpvar_46.zw = vec2(0.0, 0.0);
|
|
tmpvar_46.xy = (xlv_TEXCOORD0 + (vec2(1.0, 0.0) * _MainTex_TexelSize.xy));
|
|
highp vec4 tmpvar_47;
|
|
lowp vec4 tmpvar_48;
|
|
tmpvar_48 = impl_low_texture2DLodEXT (_MainTex, tmpvar_46.xy, 0.0);
|
|
tmpvar_47 = tmpvar_48;
|
|
highp float tmpvar_49;
|
|
tmpvar_49 = tmpvar_47.w;
|
|
highp vec4 tmpvar_50;
|
|
tmpvar_50.zw = vec2(0.0, 0.0);
|
|
tmpvar_50.xy = (xlv_TEXCOORD0 + (vec2(0.0, -1.0) * _MainTex_TexelSize.xy));
|
|
highp vec4 tmpvar_51;
|
|
lowp vec4 tmpvar_52;
|
|
tmpvar_52 = impl_low_texture2DLodEXT (_MainTex, tmpvar_50.xy, 0.0);
|
|
tmpvar_51 = tmpvar_52;
|
|
lumaN_38 = tmpvar_51.w;
|
|
highp vec4 tmpvar_53;
|
|
tmpvar_53.zw = vec2(0.0, 0.0);
|
|
tmpvar_53.xy = (xlv_TEXCOORD0 + (vec2(-1.0, 0.0) * _MainTex_TexelSize.xy));
|
|
highp vec4 tmpvar_54;
|
|
lowp vec4 tmpvar_55;
|
|
tmpvar_55 = impl_low_texture2DLodEXT (_MainTex, tmpvar_53.xy, 0.0);
|
|
tmpvar_54 = tmpvar_55;
|
|
highp float tmpvar_56;
|
|
tmpvar_56 = tmpvar_54.w;
|
|
highp float tmpvar_57;
|
|
tmpvar_57 = max (max (tmpvar_51.w, tmpvar_54.w), max (max (tmpvar_47.w, tmpvar_44.w), tmpvar_41.w));
|
|
range_37 = (tmpvar_57 - min (min (tmpvar_51.w, tmpvar_54.w), min (
|
|
min (tmpvar_47.w, tmpvar_44.w)
|
|
, tmpvar_41.w)));
|
|
if ((range_37 < max (0.0833, (tmpvar_57 * 0.166)))) {
|
|
tmpvar_2 = tmpvar_41;
|
|
} else {
|
|
highp vec4 tmpvar_58;
|
|
tmpvar_58.zw = vec2(0.0, 0.0);
|
|
tmpvar_58.xy = (xlv_TEXCOORD0 - _MainTex_TexelSize.xy);
|
|
highp vec4 tmpvar_59;
|
|
lowp vec4 tmpvar_60;
|
|
tmpvar_60 = impl_low_texture2DLodEXT (_MainTex, tmpvar_58.xy, 0.0);
|
|
tmpvar_59 = tmpvar_60;
|
|
highp vec4 tmpvar_61;
|
|
tmpvar_61.zw = vec2(0.0, 0.0);
|
|
tmpvar_61.xy = (xlv_TEXCOORD0 + _MainTex_TexelSize.xy);
|
|
highp vec4 tmpvar_62;
|
|
lowp vec4 tmpvar_63;
|
|
tmpvar_63 = impl_low_texture2DLodEXT (_MainTex, tmpvar_61.xy, 0.0);
|
|
tmpvar_62 = tmpvar_63;
|
|
highp vec4 tmpvar_64;
|
|
tmpvar_64.zw = vec2(0.0, 0.0);
|
|
tmpvar_64.xy = (xlv_TEXCOORD0 + (vec2(1.0, -1.0) * _MainTex_TexelSize.xy));
|
|
highp vec4 tmpvar_65;
|
|
lowp vec4 tmpvar_66;
|
|
tmpvar_66 = impl_low_texture2DLodEXT (_MainTex, tmpvar_64.xy, 0.0);
|
|
tmpvar_65 = tmpvar_66;
|
|
highp vec4 tmpvar_67;
|
|
tmpvar_67.zw = vec2(0.0, 0.0);
|
|
tmpvar_67.xy = (xlv_TEXCOORD0 + (vec2(-1.0, 1.0) * _MainTex_TexelSize.xy));
|
|
highp vec4 tmpvar_68;
|
|
lowp vec4 tmpvar_69;
|
|
tmpvar_69 = impl_low_texture2DLodEXT (_MainTex, tmpvar_67.xy, 0.0);
|
|
tmpvar_68 = tmpvar_69;
|
|
lumaNS_36 = (tmpvar_51.w + tmpvar_44.w);
|
|
lumaWE_35 = (tmpvar_54.w + tmpvar_47.w);
|
|
subpixRcpRange_34 = (1.0/(range_37));
|
|
lumaNESE_33 = (tmpvar_65.w + tmpvar_62.w);
|
|
lumaNWSW_32 = (tmpvar_59.w + tmpvar_68.w);
|
|
lengthSign_31 = fxaaQualityRcpFrame_1.x;
|
|
horzSpan_30 = ((abs(
|
|
((-2.0 * tmpvar_54.w) + lumaNWSW_32)
|
|
) + (
|
|
(abs(((-2.0 * tmpvar_41.w) + lumaNS_36)) * 2.0)
|
|
+
|
|
abs(((-2.0 * tmpvar_47.w) + lumaNESE_33))
|
|
)) >= (abs(
|
|
((-2.0 * tmpvar_44.w) + (tmpvar_68.w + tmpvar_62.w))
|
|
) + (
|
|
(abs(((-2.0 * tmpvar_41.w) + lumaWE_35)) * 2.0)
|
|
+
|
|
abs(((-2.0 * tmpvar_51.w) + (tmpvar_59.w + tmpvar_65.w)))
|
|
)));
|
|
subpixA_29 = (((lumaNS_36 + lumaWE_35) * 2.0) + (lumaNWSW_32 + lumaNESE_33));
|
|
if (!(horzSpan_30)) {
|
|
lumaN_38 = tmpvar_56;
|
|
};
|
|
if (!(horzSpan_30)) {
|
|
lumaS_39 = tmpvar_49;
|
|
};
|
|
if (horzSpan_30) {
|
|
lengthSign_31 = fxaaQualityRcpFrame_1.y;
|
|
};
|
|
subpixB_28 = ((subpixA_29 * 0.0833333) - tmpvar_41.w);
|
|
gradientN_27 = (lumaN_38 - tmpvar_41.w);
|
|
gradientS_26 = (lumaS_39 - tmpvar_41.w);
|
|
lumaNN_25 = (lumaN_38 + tmpvar_41.w);
|
|
lumaSS_24 = (lumaS_39 + tmpvar_41.w);
|
|
pairN_23 = (abs(gradientN_27) >= abs(gradientS_26));
|
|
highp float tmpvar_70;
|
|
tmpvar_70 = max (abs(gradientN_27), abs(gradientS_26));
|
|
if (pairN_23) {
|
|
lengthSign_31 = -(lengthSign_31);
|
|
};
|
|
highp float tmpvar_71;
|
|
tmpvar_71 = clamp ((abs(subpixB_28) * subpixRcpRange_34), 0.0, 1.0);
|
|
posB_22 = xlv_TEXCOORD0;
|
|
highp float tmpvar_72;
|
|
if (!(horzSpan_30)) {
|
|
tmpvar_72 = 0.0;
|
|
} else {
|
|
tmpvar_72 = fxaaQualityRcpFrame_1.x;
|
|
};
|
|
highp float tmpvar_73;
|
|
if (horzSpan_30) {
|
|
tmpvar_73 = 0.0;
|
|
} else {
|
|
tmpvar_73 = fxaaQualityRcpFrame_1.y;
|
|
};
|
|
if (!(horzSpan_30)) {
|
|
posB_22.x = (xlv_TEXCOORD0.x + (lengthSign_31 * 0.5));
|
|
};
|
|
if (horzSpan_30) {
|
|
posB_22.y = (xlv_TEXCOORD0.y + (lengthSign_31 * 0.5));
|
|
};
|
|
posN_21.x = (posB_22.x - tmpvar_72);
|
|
posN_21.y = (posB_22.y - tmpvar_73);
|
|
posP_20.x = (posB_22.x + tmpvar_72);
|
|
posP_20.y = (posB_22.y + tmpvar_73);
|
|
subpixD_19 = ((-2.0 * tmpvar_71) + 3.0);
|
|
highp vec4 tmpvar_74;
|
|
lowp vec4 tmpvar_75;
|
|
tmpvar_75 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_74 = tmpvar_75;
|
|
lumaEndN_18 = tmpvar_74.w;
|
|
subpixE_17 = (tmpvar_71 * tmpvar_71);
|
|
highp vec4 tmpvar_76;
|
|
lowp vec4 tmpvar_77;
|
|
tmpvar_77 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_76 = tmpvar_77;
|
|
lumaEndP_16 = tmpvar_76.w;
|
|
if (!(pairN_23)) {
|
|
lumaNN_25 = lumaSS_24;
|
|
};
|
|
gradientScaled_15 = (tmpvar_70 / 4.0);
|
|
subpixF_14 = (subpixD_19 * subpixE_17);
|
|
lumaMLTZero_13 = ((tmpvar_41.w - (lumaNN_25 * 0.5)) < 0.0);
|
|
lumaEndN_18 = (tmpvar_74.w - (lumaNN_25 * 0.5));
|
|
lumaEndP_16 = (tmpvar_76.w - (lumaNN_25 * 0.5));
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - tmpvar_72);
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - tmpvar_73);
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + tmpvar_72);
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + tmpvar_73);
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_78;
|
|
lowp vec4 tmpvar_79;
|
|
tmpvar_79 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_78 = tmpvar_79;
|
|
lumaEndN_18 = tmpvar_78.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_80;
|
|
lowp vec4 tmpvar_81;
|
|
tmpvar_81 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_80 = tmpvar_81;
|
|
lumaEndP_16 = tmpvar_80.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - tmpvar_72);
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - tmpvar_73);
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + tmpvar_72);
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + tmpvar_73);
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_82;
|
|
lowp vec4 tmpvar_83;
|
|
tmpvar_83 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_82 = tmpvar_83;
|
|
lumaEndN_18 = tmpvar_82.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_84;
|
|
lowp vec4 tmpvar_85;
|
|
tmpvar_85 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_84 = tmpvar_85;
|
|
lumaEndP_16 = tmpvar_84.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - tmpvar_72);
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - tmpvar_73);
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + tmpvar_72);
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + tmpvar_73);
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_86;
|
|
lowp vec4 tmpvar_87;
|
|
tmpvar_87 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_86 = tmpvar_87;
|
|
lumaEndN_18 = tmpvar_86.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_88;
|
|
lowp vec4 tmpvar_89;
|
|
tmpvar_89 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_88 = tmpvar_89;
|
|
lumaEndP_16 = tmpvar_88.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - tmpvar_72);
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - tmpvar_73);
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + tmpvar_72);
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + tmpvar_73);
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_90;
|
|
lowp vec4 tmpvar_91;
|
|
tmpvar_91 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_90 = tmpvar_91;
|
|
lumaEndN_18 = tmpvar_90.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_92;
|
|
lowp vec4 tmpvar_93;
|
|
tmpvar_93 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_92 = tmpvar_93;
|
|
lumaEndP_16 = tmpvar_92.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - (tmpvar_72 * 1.5));
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - (tmpvar_73 * 1.5));
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + (tmpvar_72 * 1.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + (tmpvar_73 * 1.5));
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_94;
|
|
lowp vec4 tmpvar_95;
|
|
tmpvar_95 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_94 = tmpvar_95;
|
|
lumaEndN_18 = tmpvar_94.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_96;
|
|
lowp vec4 tmpvar_97;
|
|
tmpvar_97 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_96 = tmpvar_97;
|
|
lumaEndP_16 = tmpvar_96.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - (tmpvar_73 * 2.0));
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + (tmpvar_73 * 2.0));
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_98;
|
|
lowp vec4 tmpvar_99;
|
|
tmpvar_99 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_98 = tmpvar_99;
|
|
lumaEndN_18 = tmpvar_98.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_100;
|
|
lowp vec4 tmpvar_101;
|
|
tmpvar_101 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_100 = tmpvar_101;
|
|
lumaEndP_16 = tmpvar_100.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - (tmpvar_73 * 2.0));
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + (tmpvar_73 * 2.0));
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_102;
|
|
lowp vec4 tmpvar_103;
|
|
tmpvar_103 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_102 = tmpvar_103;
|
|
lumaEndN_18 = tmpvar_102.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_104;
|
|
lowp vec4 tmpvar_105;
|
|
tmpvar_105 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_104 = tmpvar_105;
|
|
lumaEndP_16 = tmpvar_104.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - (tmpvar_73 * 2.0));
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + (tmpvar_73 * 2.0));
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_106;
|
|
lowp vec4 tmpvar_107;
|
|
tmpvar_107 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_106 = tmpvar_107;
|
|
lumaEndN_18 = tmpvar_106.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_108;
|
|
lowp vec4 tmpvar_109;
|
|
tmpvar_109 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_108 = tmpvar_109;
|
|
lumaEndP_16 = tmpvar_108.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - (tmpvar_73 * 2.0));
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + (tmpvar_72 * 2.0));
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + (tmpvar_73 * 2.0));
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_110;
|
|
lowp vec4 tmpvar_111;
|
|
tmpvar_111 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_110 = tmpvar_111;
|
|
lumaEndN_18 = tmpvar_110.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_112;
|
|
lowp vec4 tmpvar_113;
|
|
tmpvar_113 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_112 = tmpvar_113;
|
|
lumaEndP_16 = tmpvar_112.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - (tmpvar_72 * 4.0));
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - (tmpvar_73 * 4.0));
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + (tmpvar_72 * 4.0));
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + (tmpvar_73 * 4.0));
|
|
};
|
|
if (doneNP_10) {
|
|
if (!(doneN_12)) {
|
|
highp vec4 tmpvar_114;
|
|
lowp vec4 tmpvar_115;
|
|
tmpvar_115 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0);
|
|
tmpvar_114 = tmpvar_115;
|
|
lumaEndN_18 = tmpvar_114.w;
|
|
};
|
|
if (!(doneP_11)) {
|
|
highp vec4 tmpvar_116;
|
|
lowp vec4 tmpvar_117;
|
|
tmpvar_117 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0);
|
|
tmpvar_116 = tmpvar_117;
|
|
lumaEndP_16 = tmpvar_116.w;
|
|
};
|
|
if (!(doneN_12)) {
|
|
lumaEndN_18 = (lumaEndN_18 - (lumaNN_25 * 0.5));
|
|
};
|
|
if (!(doneP_11)) {
|
|
lumaEndP_16 = (lumaEndP_16 - (lumaNN_25 * 0.5));
|
|
};
|
|
doneN_12 = (abs(lumaEndN_18) >= gradientScaled_15);
|
|
doneP_11 = (abs(lumaEndP_16) >= gradientScaled_15);
|
|
if (!(doneN_12)) {
|
|
posN_21.x = (posN_21.x - (tmpvar_72 * 8.0));
|
|
};
|
|
if (!(doneN_12)) {
|
|
posN_21.y = (posN_21.y - (tmpvar_73 * 8.0));
|
|
};
|
|
doneNP_10 = !((doneN_12 && doneP_11));
|
|
if (!(doneP_11)) {
|
|
posP_20.x = (posP_20.x + (tmpvar_72 * 8.0));
|
|
};
|
|
if (!(doneP_11)) {
|
|
posP_20.y = (posP_20.y + (tmpvar_73 * 8.0));
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
dstN_9 = (xlv_TEXCOORD0.x - posN_21.x);
|
|
dstP_8 = (posP_20.x - xlv_TEXCOORD0.x);
|
|
if (!(horzSpan_30)) {
|
|
dstN_9 = (xlv_TEXCOORD0.y - posN_21.y);
|
|
};
|
|
if (!(horzSpan_30)) {
|
|
dstP_8 = (posP_20.y - xlv_TEXCOORD0.y);
|
|
};
|
|
goodSpanN_7 = ((lumaEndN_18 < 0.0) != lumaMLTZero_13);
|
|
goodSpanP_6 = ((lumaEndP_16 < 0.0) != lumaMLTZero_13);
|
|
spanLengthRcp_5 = (1.0/((dstP_8 + dstN_9)));
|
|
highp float tmpvar_118;
|
|
tmpvar_118 = min (dstN_9, dstP_8);
|
|
bool tmpvar_119;
|
|
if ((dstN_9 < dstP_8)) {
|
|
tmpvar_119 = goodSpanN_7;
|
|
} else {
|
|
tmpvar_119 = goodSpanP_6;
|
|
};
|
|
pixelOffset_4 = ((tmpvar_118 * -(spanLengthRcp_5)) + 0.5);
|
|
subpixH_3 = ((subpixF_14 * subpixF_14) * 0.75);
|
|
highp float tmpvar_120;
|
|
if (tmpvar_119) {
|
|
tmpvar_120 = pixelOffset_4;
|
|
} else {
|
|
tmpvar_120 = 0.0;
|
|
};
|
|
highp float tmpvar_121;
|
|
tmpvar_121 = max (tmpvar_120, subpixH_3);
|
|
if (!(horzSpan_30)) {
|
|
posM_40.x = (xlv_TEXCOORD0.x + (tmpvar_121 * lengthSign_31));
|
|
};
|
|
if (horzSpan_30) {
|
|
posM_40.y = (xlv_TEXCOORD0.y + (tmpvar_121 * lengthSign_31));
|
|
};
|
|
lowp vec4 tmpvar_122;
|
|
tmpvar_122 = impl_low_texture2DLodEXT (_MainTex, posM_40, 0.0);
|
|
highp vec4 tmpvar_123;
|
|
tmpvar_123.xyz = tmpvar_122.xyz;
|
|
tmpvar_123.w = tmpvar_41.w;
|
|
tmpvar_2 = tmpvar_123;
|
|
};
|
|
gl_FragData[0] = tmpvar_2;
|
|
}
|
|
|
|
|
|
// stats: 401 alu 32 tex 110 flow
|
|
// inputs: 1
|
|
// #0: xlv_TEXCOORD0 (high float) 2x1 [-1]
|
|
// uniforms: 1 (total size: 0)
|
|
// #0: _MainTex_TexelSize (high float) 4x1 [-1]
|
|
// textures: 1
|
|
// #0: _MainTex (low 2d) 0x0 [-1]
|