mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
66 lines
1.3 KiB
Text
66 lines
1.3 KiB
Text
struct v2f {
|
|
vec4 pos;
|
|
vec4 uv[2];
|
|
};
|
|
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[0].zw);
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = (c + tmpvar_3);
|
|
c = tmpvar_4;
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = texture2D (_MainTex, i.uv[1].xy);
|
|
vec4 tmpvar_6;
|
|
tmpvar_6 = (c + tmpvar_5);
|
|
c = tmpvar_6;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = texture2D (_MainTex, i.uv[1].zw);
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = (c + tmpvar_7);
|
|
c = tmpvar_8;
|
|
vec3 tmpvar_9;
|
|
tmpvar_9 = (c.xyz * _Color.xyz);
|
|
c.xyz = tmpvar_9.xyz.xyz;
|
|
return (c * _Color.w);
|
|
}
|
|
|
|
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 = frag (xlt_i);
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = tmpvar_6;
|
|
xl_retval = tmpvar_7;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = xl_retval.xyzw;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = tmpvar_8;
|
|
gl_FragData[0] = tmpvar_9;
|
|
}
|
|
|