mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
350 lines
7.3 KiB
Text
350 lines
7.3 KiB
Text
varying highp vec4 xlv_TEXCOORD0;
|
|
mediump float xll_mod (
|
|
in mediump float x_1,
|
|
in mediump float y_2
|
|
)
|
|
{
|
|
mediump float f_3;
|
|
mediump float d_4;
|
|
mediump float tmpvar_5;
|
|
tmpvar_5 = (x_1 / y_2);
|
|
d_4 = tmpvar_5;
|
|
mediump float tmpvar_6;
|
|
tmpvar_6 = abs (d_4);
|
|
mediump float tmpvar_7;
|
|
tmpvar_7 = fract (tmpvar_6);
|
|
mediump float tmpvar_8;
|
|
tmpvar_8 = (tmpvar_7 * y_2);
|
|
f_3 = tmpvar_8;
|
|
mediump float tmpvar_9;
|
|
if ((d_4 >= 0.0)) {
|
|
tmpvar_9 = f_3;
|
|
} else {
|
|
tmpvar_9 = -(f_3);
|
|
};
|
|
return tmpvar_9;
|
|
}
|
|
|
|
mediump vec2 xll_mod (
|
|
in mediump vec2 x_10,
|
|
in mediump vec2 y_11
|
|
)
|
|
{
|
|
mediump vec2 f_12;
|
|
mediump vec2 d_13;
|
|
mediump vec2 tmpvar_14;
|
|
tmpvar_14 = (x_10 / y_11);
|
|
d_13 = tmpvar_14;
|
|
mediump vec2 tmpvar_15;
|
|
tmpvar_15 = abs (d_13);
|
|
mediump vec2 tmpvar_16;
|
|
tmpvar_16 = fract (tmpvar_15);
|
|
mediump vec2 tmpvar_17;
|
|
tmpvar_17 = (tmpvar_16 * y_11);
|
|
f_12 = tmpvar_17;
|
|
mediump float tmpvar_18;
|
|
if ((d_13.x >= 0.0)) {
|
|
tmpvar_18 = f_12.x;
|
|
} else {
|
|
tmpvar_18 = -(f_12.x);
|
|
};
|
|
mediump float tmpvar_19;
|
|
if ((d_13.y >= 0.0)) {
|
|
tmpvar_19 = f_12.y;
|
|
} else {
|
|
tmpvar_19 = -(f_12.y);
|
|
};
|
|
mediump vec2 tmpvar_20;
|
|
tmpvar_20.x = tmpvar_18;
|
|
tmpvar_20.y = tmpvar_19;
|
|
return tmpvar_20;
|
|
}
|
|
|
|
mediump vec3 xll_mod (
|
|
in mediump vec3 x_21,
|
|
in mediump vec3 y_22
|
|
)
|
|
{
|
|
mediump vec3 f_23;
|
|
mediump vec3 d_24;
|
|
mediump vec3 tmpvar_25;
|
|
tmpvar_25 = (x_21 / y_22);
|
|
d_24 = tmpvar_25;
|
|
mediump vec3 tmpvar_26;
|
|
tmpvar_26 = abs (d_24);
|
|
mediump vec3 tmpvar_27;
|
|
tmpvar_27 = fract (tmpvar_26);
|
|
mediump vec3 tmpvar_28;
|
|
tmpvar_28 = (tmpvar_27 * y_22);
|
|
f_23 = tmpvar_28;
|
|
mediump float tmpvar_29;
|
|
if ((d_24.x >= 0.0)) {
|
|
tmpvar_29 = f_23.x;
|
|
} else {
|
|
tmpvar_29 = -(f_23.x);
|
|
};
|
|
mediump float tmpvar_30;
|
|
if ((d_24.y >= 0.0)) {
|
|
tmpvar_30 = f_23.y;
|
|
} else {
|
|
tmpvar_30 = -(f_23.y);
|
|
};
|
|
mediump float tmpvar_31;
|
|
if ((d_24.z >= 0.0)) {
|
|
tmpvar_31 = f_23.z;
|
|
} else {
|
|
tmpvar_31 = -(f_23.z);
|
|
};
|
|
mediump vec3 tmpvar_32;
|
|
tmpvar_32.x = tmpvar_29;
|
|
tmpvar_32.y = tmpvar_30;
|
|
tmpvar_32.z = tmpvar_31;
|
|
return tmpvar_32;
|
|
}
|
|
|
|
mediump vec4 xll_mod (
|
|
in mediump vec4 x_33,
|
|
in mediump vec4 y_34
|
|
)
|
|
{
|
|
mediump vec4 f_35;
|
|
mediump vec4 d_36;
|
|
mediump vec4 tmpvar_37;
|
|
tmpvar_37 = (x_33 / y_34);
|
|
d_36 = tmpvar_37;
|
|
mediump vec4 tmpvar_38;
|
|
tmpvar_38 = abs (d_36);
|
|
mediump vec4 tmpvar_39;
|
|
tmpvar_39 = fract (tmpvar_38);
|
|
mediump vec4 tmpvar_40;
|
|
tmpvar_40 = (tmpvar_39 * y_34);
|
|
f_35 = tmpvar_40;
|
|
mediump float tmpvar_41;
|
|
if ((d_36.x >= 0.0)) {
|
|
tmpvar_41 = f_35.x;
|
|
} else {
|
|
tmpvar_41 = -(f_35.x);
|
|
};
|
|
mediump float tmpvar_42;
|
|
if ((d_36.y >= 0.0)) {
|
|
tmpvar_42 = f_35.y;
|
|
} else {
|
|
tmpvar_42 = -(f_35.y);
|
|
};
|
|
mediump float tmpvar_43;
|
|
if ((d_36.z >= 0.0)) {
|
|
tmpvar_43 = f_35.z;
|
|
} else {
|
|
tmpvar_43 = -(f_35.z);
|
|
};
|
|
mediump float tmpvar_44;
|
|
if ((d_36.w >= 0.0)) {
|
|
tmpvar_44 = f_35.w;
|
|
} else {
|
|
tmpvar_44 = -(f_35.w);
|
|
};
|
|
mediump vec4 tmpvar_45;
|
|
tmpvar_45.x = tmpvar_41;
|
|
tmpvar_45.y = tmpvar_42;
|
|
tmpvar_45.z = tmpvar_43;
|
|
tmpvar_45.w = tmpvar_44;
|
|
return tmpvar_45;
|
|
}
|
|
|
|
mediump float xll_modf (
|
|
in mediump float x_46,
|
|
out int ip_47
|
|
)
|
|
{
|
|
int tmpvar_48;
|
|
tmpvar_48 = int(x_46);
|
|
ip_47 = tmpvar_48;
|
|
return (x_46 - float(ip_47));
|
|
}
|
|
|
|
mediump float xll_modf (
|
|
in mediump float x_49,
|
|
out mediump float ip_50
|
|
)
|
|
{
|
|
int i_51;
|
|
int tmpvar_52;
|
|
tmpvar_52 = int(x_49);
|
|
i_51 = tmpvar_52;
|
|
mediump float tmpvar_53;
|
|
tmpvar_53 = float(i_51);
|
|
ip_50 = tmpvar_53;
|
|
return (x_49 - ip_50);
|
|
}
|
|
|
|
mediump vec2 xll_modf (
|
|
in mediump vec2 x_54,
|
|
out ivec2 ip_55
|
|
)
|
|
{
|
|
ivec2 tmpvar_56;
|
|
tmpvar_56 = ivec2(x_54).xy;
|
|
ivec2 tmpvar_57;
|
|
tmpvar_57 = tmpvar_56;
|
|
ip_55 = tmpvar_57;
|
|
mediump vec2 tmpvar_58;
|
|
tmpvar_58 = vec2(ip_55).xy;
|
|
return (x_54 - tmpvar_58);
|
|
}
|
|
|
|
mediump vec2 xll_modf (
|
|
in mediump vec2 x_59,
|
|
out mediump vec2 ip_60
|
|
)
|
|
{
|
|
ivec2 i_61;
|
|
ivec2 tmpvar_62;
|
|
tmpvar_62 = ivec2(x_59).xy;
|
|
ivec2 tmpvar_63;
|
|
tmpvar_63 = tmpvar_62;
|
|
i_61 = tmpvar_63;
|
|
mediump vec2 tmpvar_64;
|
|
tmpvar_64 = vec2(i_61).xy;
|
|
mediump vec2 tmpvar_65;
|
|
tmpvar_65 = tmpvar_64;
|
|
ip_60 = tmpvar_65;
|
|
return (x_59 - ip_60);
|
|
}
|
|
|
|
mediump vec3 xll_modf (
|
|
in mediump vec3 x_66,
|
|
out ivec3 ip_67
|
|
)
|
|
{
|
|
ivec3 tmpvar_68;
|
|
tmpvar_68 = ivec3(x_66).xyz;
|
|
ivec3 tmpvar_69;
|
|
tmpvar_69 = tmpvar_68;
|
|
ip_67 = tmpvar_69;
|
|
mediump vec3 tmpvar_70;
|
|
tmpvar_70 = vec3(ip_67).xyz;
|
|
return (x_66 - tmpvar_70);
|
|
}
|
|
|
|
mediump vec3 xll_modf (
|
|
in mediump vec3 x_71,
|
|
out mediump vec3 ip_72
|
|
)
|
|
{
|
|
ivec3 i_73;
|
|
ivec3 tmpvar_74;
|
|
tmpvar_74 = ivec3(x_71).xyz;
|
|
ivec3 tmpvar_75;
|
|
tmpvar_75 = tmpvar_74;
|
|
i_73 = tmpvar_75;
|
|
mediump vec3 tmpvar_76;
|
|
tmpvar_76 = vec3(i_73).xyz;
|
|
mediump vec3 tmpvar_77;
|
|
tmpvar_77 = tmpvar_76;
|
|
ip_72 = tmpvar_77;
|
|
return (x_71 - ip_72);
|
|
}
|
|
|
|
mediump vec4 xll_modf (
|
|
in mediump vec4 x_78,
|
|
out ivec4 ip_79
|
|
)
|
|
{
|
|
ivec4 tmpvar_80;
|
|
tmpvar_80 = ivec4(x_78).xyzw;
|
|
ivec4 tmpvar_81;
|
|
tmpvar_81 = tmpvar_80;
|
|
ip_79 = tmpvar_81;
|
|
mediump vec4 tmpvar_82;
|
|
tmpvar_82 = vec4(ip_79).xyzw;
|
|
return (x_78 - tmpvar_82);
|
|
}
|
|
|
|
mediump vec4 xll_modf (
|
|
in mediump vec4 x_83,
|
|
out mediump vec4 ip_84
|
|
)
|
|
{
|
|
ivec4 i_85;
|
|
ivec4 tmpvar_86;
|
|
tmpvar_86 = ivec4(x_83).xyzw;
|
|
ivec4 tmpvar_87;
|
|
tmpvar_87 = tmpvar_86;
|
|
i_85 = tmpvar_87;
|
|
mediump vec4 tmpvar_88;
|
|
tmpvar_88 = vec4(i_85).xyzw;
|
|
mediump vec4 tmpvar_89;
|
|
tmpvar_89 = tmpvar_88;
|
|
ip_84 = tmpvar_89;
|
|
return (x_83 - ip_84);
|
|
}
|
|
|
|
mediump vec4 xlat_main (
|
|
in highp vec4 uv_90
|
|
)
|
|
{
|
|
mediump vec4 d_91;
|
|
mediump vec4 c_92;
|
|
mediump vec4 tmpvar_93;
|
|
tmpvar_93 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
c_92 = tmpvar_93;
|
|
mediump float tmpvar_94;
|
|
tmpvar_94 = xll_mod (uv_90.x, 2.0);
|
|
mediump float tmpvar_95;
|
|
tmpvar_95 = (c_92.x + tmpvar_94);
|
|
c_92.x = tmpvar_95;
|
|
mediump vec2 tmpvar_96;
|
|
tmpvar_96 = xll_mod (uv_90.xy, vec2(2.0, 2.0));
|
|
mediump vec2 tmpvar_97;
|
|
tmpvar_97 = (c_92.xy + tmpvar_96);
|
|
c_92.xy = tmpvar_97.xy.xy;
|
|
mediump vec3 tmpvar_98;
|
|
tmpvar_98 = xll_mod (uv_90.xyz, vec3(2.0, 2.0, 2.0));
|
|
mediump vec3 tmpvar_99;
|
|
tmpvar_99 = (c_92.xyz + tmpvar_98);
|
|
c_92.xyz = tmpvar_99.xyz.xyz;
|
|
mediump vec4 tmpvar_100;
|
|
tmpvar_100 = xll_mod (uv_90.xyzw, vec4(2.0, 2.0, 2.0, 2.0));
|
|
mediump vec4 tmpvar_101;
|
|
tmpvar_101 = (c_92.xyzw + tmpvar_100);
|
|
c_92 = tmpvar_101.xyzw.xyzw;
|
|
mediump float tmpvar_102;
|
|
tmpvar_102 = xll_modf (uv_90.x, d_91.x);
|
|
mediump float tmpvar_103;
|
|
tmpvar_103 = (c_92.x + tmpvar_102);
|
|
c_92.x = tmpvar_103;
|
|
mediump vec2 tmpvar_104;
|
|
tmpvar_104 = xll_modf (uv_90.xy, d_91.xy);
|
|
mediump vec2 tmpvar_105;
|
|
tmpvar_105 = (c_92.xy + tmpvar_104);
|
|
c_92.xy = tmpvar_105.xy.xy;
|
|
mediump vec3 tmpvar_106;
|
|
tmpvar_106 = xll_modf (uv_90.xyz, d_91.xyz);
|
|
mediump vec3 tmpvar_107;
|
|
tmpvar_107 = (c_92.xyz + tmpvar_106);
|
|
c_92.xyz = tmpvar_107.xyz.xyz;
|
|
mediump vec4 tmpvar_108;
|
|
tmpvar_108 = xll_modf (uv_90.xyzw, d_91.xyzw);
|
|
mediump vec4 tmpvar_109;
|
|
tmpvar_109 = (c_92.xyzw + tmpvar_108);
|
|
c_92 = tmpvar_109.xyzw.xyzw;
|
|
return c_92;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
mediump vec4 xl_retval_110;
|
|
highp vec4 tmpvar_111;
|
|
tmpvar_111 = xlv_TEXCOORD0.xyzw;
|
|
mediump vec4 tmpvar_112;
|
|
tmpvar_112 = xlat_main (tmpvar_111);
|
|
mediump vec4 tmpvar_113;
|
|
tmpvar_113 = tmpvar_112;
|
|
xl_retval_110 = tmpvar_113;
|
|
mediump vec4 tmpvar_114;
|
|
tmpvar_114 = xl_retval_110.xyzw;
|
|
mediump vec4 tmpvar_115;
|
|
tmpvar_115 = tmpvar_114;
|
|
gl_FragData[0] = tmpvar_115;
|
|
}
|
|
|