mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-12 09:11:18 -05:00
85 lines
1.8 KiB
Text
85 lines
1.8 KiB
Text
struct v2f {
|
|
vec4 pos;
|
|
vec4 uv[4];
|
|
};
|
|
uniform sampler2D _MainTex;
|
|
uniform vec4 _Color;
|
|
vec4 frag (
|
|
in v2f i_1
|
|
)
|
|
{
|
|
vec4 c_2;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_MainTex, i_1.uv[0].xy);
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = tmpvar_3;
|
|
c_2 = tmpvar_4;
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = texture2D (_MainTex, i_1.uv[1].xy);
|
|
vec4 tmpvar_6;
|
|
tmpvar_6 = (c_2 + tmpvar_5);
|
|
c_2 = tmpvar_6;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = texture2D (_MainTex, i_1.uv[2].xy);
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = (c_2 + tmpvar_7);
|
|
c_2 = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = texture2D (_MainTex, i_1.uv[3].xy);
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = (c_2 + tmpvar_9);
|
|
c_2 = tmpvar_10;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11 = (c_2 / 4.0);
|
|
c_2 = tmpvar_11;
|
|
vec3 tmpvar_12;
|
|
tmpvar_12 = (c_2.xyz * _Color.xyz);
|
|
c_2.xyz = tmpvar_12.xyz.xyz;
|
|
vec3 tmpvar_13;
|
|
tmpvar_13 = (c_2.xyz * (c_2.w + _Color.w));
|
|
c_2.xyz = tmpvar_13.xyz.xyz;
|
|
float tmpvar_14;
|
|
tmpvar_14 = 0.0;
|
|
c_2.w = vec4(tmpvar_14).w;
|
|
return c_2;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
v2f xlt_i_15;
|
|
vec4 xl_retval_16;
|
|
vec4 tmpvar_17;
|
|
tmpvar_17 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
xlt_i_15.pos = tmpvar_17;
|
|
vec4 tmpvar_18;
|
|
tmpvar_18 = gl_TexCoord[0].xyzw;
|
|
vec4 tmpvar_19;
|
|
tmpvar_19 = tmpvar_18;
|
|
xlt_i_15.uv[0] = tmpvar_19;
|
|
vec4 tmpvar_20;
|
|
tmpvar_20 = gl_TexCoord[1].xyzw;
|
|
vec4 tmpvar_21;
|
|
tmpvar_21 = tmpvar_20;
|
|
xlt_i_15.uv[1] = tmpvar_21;
|
|
vec4 tmpvar_22;
|
|
tmpvar_22 = gl_TexCoord[2].xyzw;
|
|
vec4 tmpvar_23;
|
|
tmpvar_23 = tmpvar_22;
|
|
xlt_i_15.uv[2] = tmpvar_23;
|
|
vec4 tmpvar_24;
|
|
tmpvar_24 = gl_TexCoord[3].xyzw;
|
|
vec4 tmpvar_25;
|
|
tmpvar_25 = tmpvar_24;
|
|
xlt_i_15.uv[3] = tmpvar_25;
|
|
vec4 tmpvar_26;
|
|
tmpvar_26 = frag (xlt_i_15);
|
|
vec4 tmpvar_27;
|
|
tmpvar_27 = tmpvar_26;
|
|
xl_retval_16 = tmpvar_27;
|
|
vec4 tmpvar_28;
|
|
tmpvar_28 = xl_retval_16.xyzw;
|
|
vec4 tmpvar_29;
|
|
tmpvar_29 = tmpvar_28;
|
|
gl_FragData[0] = tmpvar_29;
|
|
}
|
|
|