mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-11 00:31:28 -05:00
86 lines
1.7 KiB
Text
86 lines
1.7 KiB
Text
|
struct v2f {
|
||
|
vec4 pos;
|
||
|
vec4 uv[4];
|
||
|
};
|
||
|
uniform sampler2D _MainTex;
|
||
|
uniform vec4 _Color;
|
||
|
vec4 frag (
|
||
|
in v2f i
|
||
|
)
|
||
|
{
|
||
|
vec4 c;
|
||
|
vec4 tmpvar_1;
|
||
|
tmpvar_1 = texture2D (_MainTex, i.uv[0].xy);
|
||
|
vec4 tmpvar_2;
|
||
|
tmpvar_2 = tmpvar_1;
|
||
|
c = tmpvar_2;
|
||
|
vec4 tmpvar_3;
|
||
|
tmpvar_3 = texture2D (_MainTex, i.uv[1].xy);
|
||
|
vec4 tmpvar_4;
|
||
|
tmpvar_4 = (c + tmpvar_3);
|
||
|
c = tmpvar_4;
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = texture2D (_MainTex, i.uv[2].xy);
|
||
|
vec4 tmpvar_6;
|
||
|
tmpvar_6 = (c + tmpvar_5);
|
||
|
c = tmpvar_6;
|
||
|
vec4 tmpvar_7;
|
||
|
tmpvar_7 = texture2D (_MainTex, i.uv[3].xy);
|
||
|
vec4 tmpvar_8;
|
||
|
tmpvar_8 = (c + tmpvar_7);
|
||
|
c = tmpvar_8;
|
||
|
vec4 tmpvar_9;
|
||
|
tmpvar_9 = (c / 4.0);
|
||
|
c = tmpvar_9;
|
||
|
vec3 tmpvar_10;
|
||
|
tmpvar_10 = (c.xyz * _Color.xyz);
|
||
|
c.xyz = tmpvar_10.xyz.xyz;
|
||
|
vec3 tmpvar_11;
|
||
|
tmpvar_11 = (c.xyz * (c.w + _Color.w));
|
||
|
c.xyz = tmpvar_11.xyz.xyz;
|
||
|
float tmpvar_12;
|
||
|
tmpvar_12 = 0.0;
|
||
|
c.w = vec4(tmpvar_12).w;
|
||
|
return c;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
v2f xlt_i;
|
||
|
vec4 xl_retval;
|
||
|
vec4 tmpvar_1;
|
||
|
tmpvar_1 = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
xlt_i.pos = tmpvar_1;
|
||
|
vec4 tmpvar_2;
|
||
|
tmpvar_2 = gl_TexCoord[0].xyzw;
|
||
|
vec4 tmpvar_3;
|
||
|
tmpvar_3 = tmpvar_2;
|
||
|
xlt_i.uv[0] = tmpvar_3;
|
||
|
vec4 tmpvar_4;
|
||
|
tmpvar_4 = gl_TexCoord[1].xyzw;
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = tmpvar_4;
|
||
|
xlt_i.uv[1] = tmpvar_5;
|
||
|
vec4 tmpvar_6;
|
||
|
tmpvar_6 = gl_TexCoord[2].xyzw;
|
||
|
vec4 tmpvar_7;
|
||
|
tmpvar_7 = tmpvar_6;
|
||
|
xlt_i.uv[2] = tmpvar_7;
|
||
|
vec4 tmpvar_8;
|
||
|
tmpvar_8 = gl_TexCoord[3].xyzw;
|
||
|
vec4 tmpvar_9;
|
||
|
tmpvar_9 = tmpvar_8;
|
||
|
xlt_i.uv[3] = tmpvar_9;
|
||
|
vec4 tmpvar_10;
|
||
|
tmpvar_10 = frag (xlt_i);
|
||
|
vec4 tmpvar_11;
|
||
|
tmpvar_11 = tmpvar_10;
|
||
|
xl_retval = tmpvar_11;
|
||
|
vec4 tmpvar_12;
|
||
|
tmpvar_12 = xl_retval.xyzw;
|
||
|
vec4 tmpvar_13;
|
||
|
tmpvar_13 = tmpvar_12;
|
||
|
gl_FragData[0] = tmpvar_13;
|
||
|
}
|
||
|
|