mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
255 lines
4 KiB
Text
255 lines
4 KiB
Text
#extension GL_OES_standard_derivatives : enable
|
|
varying highp vec4 xlv_TEXCOORD0;
|
|
float xll_dFdx (
|
|
in float f
|
|
)
|
|
{
|
|
float tmpvar_1;
|
|
tmpvar_1 = dFdx (f);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
vec2 xll_dFdx (
|
|
in vec2 v
|
|
)
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = dFdx (v);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
vec3 xll_dFdx (
|
|
in vec3 v
|
|
)
|
|
{
|
|
vec3 tmpvar_1;
|
|
tmpvar_1 = dFdx (v);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
vec4 xll_dFdx (
|
|
in vec4 v
|
|
)
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = dFdx (v);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
mat2 xll_dFdx (
|
|
in mat2 m
|
|
)
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = dFdx (m[0]);
|
|
vec2 tmpvar_2;
|
|
tmpvar_2 = dFdx (m[1]);
|
|
mat2 tmpvar_3;
|
|
vec2 tmpvar_4;
|
|
tmpvar_4 = tmpvar_1;
|
|
tmpvar_3[0] = tmpvar_4;
|
|
vec2 tmpvar_5;
|
|
tmpvar_5 = tmpvar_2;
|
|
tmpvar_3[1] = tmpvar_5;
|
|
return tmpvar_3;
|
|
}
|
|
|
|
mat3 xll_dFdx (
|
|
in mat3 m
|
|
)
|
|
{
|
|
vec3 tmpvar_1;
|
|
tmpvar_1 = dFdx (m[0]);
|
|
vec3 tmpvar_2;
|
|
tmpvar_2 = dFdx (m[1]);
|
|
vec3 tmpvar_3;
|
|
tmpvar_3 = dFdx (m[2]);
|
|
mat3 tmpvar_4;
|
|
vec3 tmpvar_5;
|
|
tmpvar_5 = tmpvar_1;
|
|
tmpvar_4[0] = tmpvar_5;
|
|
vec3 tmpvar_6;
|
|
tmpvar_6 = tmpvar_2;
|
|
tmpvar_4[1] = tmpvar_6;
|
|
vec3 tmpvar_7;
|
|
tmpvar_7 = tmpvar_3;
|
|
tmpvar_4[2] = tmpvar_7;
|
|
return tmpvar_4;
|
|
}
|
|
|
|
mat4 xll_dFdx (
|
|
in mat4 m
|
|
)
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = dFdx (m[0]);
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = dFdx (m[1]);
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = dFdx (m[2]);
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = dFdx (m[3]);
|
|
mat4 tmpvar_5;
|
|
vec4 tmpvar_6;
|
|
tmpvar_6 = tmpvar_1;
|
|
tmpvar_5[0] = tmpvar_6;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = tmpvar_2;
|
|
tmpvar_5[1] = tmpvar_7;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = tmpvar_3;
|
|
tmpvar_5[2] = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = tmpvar_4;
|
|
tmpvar_5[3] = tmpvar_9;
|
|
return tmpvar_5;
|
|
}
|
|
|
|
float xll_fwidth (
|
|
in float f
|
|
)
|
|
{
|
|
float tmpvar_1;
|
|
tmpvar_1 = fwidth (f);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
vec2 xll_fwidth (
|
|
in vec2 v
|
|
)
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = fwidth (v);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
vec3 xll_fwidth (
|
|
in vec3 v
|
|
)
|
|
{
|
|
vec3 tmpvar_1;
|
|
tmpvar_1 = fwidth (v);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
vec4 xll_fwidth (
|
|
in vec4 v
|
|
)
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = fwidth (v);
|
|
return tmpvar_1;
|
|
}
|
|
|
|
mat2 xll_fwidth (
|
|
in mat2 m
|
|
)
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = fwidth (m[0]);
|
|
vec2 tmpvar_2;
|
|
tmpvar_2 = fwidth (m[1]);
|
|
mat2 tmpvar_3;
|
|
vec2 tmpvar_4;
|
|
tmpvar_4 = tmpvar_1;
|
|
tmpvar_3[0] = tmpvar_4;
|
|
vec2 tmpvar_5;
|
|
tmpvar_5 = tmpvar_2;
|
|
tmpvar_3[1] = tmpvar_5;
|
|
return tmpvar_3;
|
|
}
|
|
|
|
mat3 xll_fwidth (
|
|
in mat3 m
|
|
)
|
|
{
|
|
vec3 tmpvar_1;
|
|
tmpvar_1 = fwidth (m[0]);
|
|
vec3 tmpvar_2;
|
|
tmpvar_2 = fwidth (m[1]);
|
|
vec3 tmpvar_3;
|
|
tmpvar_3 = fwidth (m[2]);
|
|
mat3 tmpvar_4;
|
|
vec3 tmpvar_5;
|
|
tmpvar_5 = tmpvar_1;
|
|
tmpvar_4[0] = tmpvar_5;
|
|
vec3 tmpvar_6;
|
|
tmpvar_6 = tmpvar_2;
|
|
tmpvar_4[1] = tmpvar_6;
|
|
vec3 tmpvar_7;
|
|
tmpvar_7 = tmpvar_3;
|
|
tmpvar_4[2] = tmpvar_7;
|
|
return tmpvar_4;
|
|
}
|
|
|
|
mat4 xll_fwidth (
|
|
in mat4 m
|
|
)
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = fwidth (m[0]);
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = fwidth (m[1]);
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = fwidth (m[2]);
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = fwidth (m[3]);
|
|
mat4 tmpvar_5;
|
|
vec4 tmpvar_6;
|
|
tmpvar_6 = tmpvar_1;
|
|
tmpvar_5[0] = tmpvar_6;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = tmpvar_2;
|
|
tmpvar_5[1] = tmpvar_7;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = tmpvar_3;
|
|
tmpvar_5[2] = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = tmpvar_4;
|
|
tmpvar_5[3] = tmpvar_9;
|
|
return tmpvar_5;
|
|
}
|
|
|
|
mediump vec4 xlat_main (
|
|
in highp vec4 uv
|
|
)
|
|
{
|
|
lowp vec4 res;
|
|
float tmpvar_1;
|
|
tmpvar_1 = xll_dFdx (uv.x);
|
|
float tmpvar_2;
|
|
tmpvar_2 = tmpvar_1;
|
|
res.x = tmpvar_2;
|
|
float tmpvar_3;
|
|
tmpvar_3 = xll_dFdx (uv.y);
|
|
float tmpvar_4;
|
|
tmpvar_4 = tmpvar_3;
|
|
res.y = vec2(tmpvar_4).y;
|
|
float tmpvar_5;
|
|
tmpvar_5 = xll_fwidth (uv.z);
|
|
float tmpvar_6;
|
|
tmpvar_6 = tmpvar_5;
|
|
res.z = vec3(tmpvar_6).z;
|
|
float tmpvar_7;
|
|
tmpvar_7 = 1.0;
|
|
res.w = vec4(tmpvar_7).w;
|
|
return res;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
mediump vec4 xl_retval;
|
|
highp vec4 tmpvar_1;
|
|
tmpvar_1 = xlv_TEXCOORD0.xyzw;
|
|
mediump vec4 tmpvar_2;
|
|
tmpvar_2 = xlat_main (tmpvar_1);
|
|
mediump vec4 tmpvar_3;
|
|
tmpvar_3 = tmpvar_2;
|
|
xl_retval = tmpvar_3;
|
|
mediump vec4 tmpvar_4;
|
|
tmpvar_4 = xl_retval.xyzw;
|
|
mediump vec4 tmpvar_5;
|
|
tmpvar_5 = tmpvar_4;
|
|
gl_FragData[0] = tmpvar_5;
|
|
}
|
|
|