mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
66 lines
1.2 KiB
Text
66 lines
1.2 KiB
Text
struct v2f {
|
|
vec4 pos;
|
|
float fog;
|
|
vec4 color;
|
|
vec2 uv;
|
|
};
|
|
varying vec4 xlv_FOG;
|
|
uniform sampler2D _MainTex;
|
|
void xll_clip (
|
|
in float x
|
|
)
|
|
{
|
|
if ((x < 0.0)) {
|
|
discard;
|
|
};
|
|
}
|
|
|
|
vec4 frag (
|
|
in v2f xlat_var_input
|
|
)
|
|
{
|
|
vec4 col;
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = texture2D (_MainTex, xlat_var_input.uv);
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = tmpvar_1;
|
|
col = tmpvar_2;
|
|
vec3 tmpvar_3;
|
|
tmpvar_3 = (col.xyz * xlat_var_input.color.xyz);
|
|
col.xyz = tmpvar_3.xyz.xyz;
|
|
xll_clip (col.w);
|
|
return col;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
v2f xlt_xlat_var_input;
|
|
vec4 xl_retval;
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
xlt_xlat_var_input.pos = tmpvar_1;
|
|
float tmpvar_2;
|
|
tmpvar_2 = xlv_FOG.x;
|
|
xlt_xlat_var_input.fog = tmpvar_2;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = gl_Color.xyzw;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = tmpvar_3;
|
|
xlt_xlat_var_input.color = tmpvar_4;
|
|
vec2 tmpvar_5;
|
|
tmpvar_5 = gl_TexCoord[0].xy;
|
|
vec2 tmpvar_6;
|
|
tmpvar_6 = tmpvar_5;
|
|
xlt_xlat_var_input.uv = tmpvar_6;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = frag (xlt_xlat_var_input);
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = tmpvar_7;
|
|
xl_retval = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = xl_retval.xyzw;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = tmpvar_9;
|
|
gl_FragData[0] = tmpvar_10;
|
|
}
|
|
|