mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
67 lines
1.3 KiB
Text
67 lines
1.3 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_1
|
||
|
)
|
||
|
{
|
||
|
if ((x_1 < 0.0)) {
|
||
|
discard;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
vec4 frag (
|
||
|
in v2f xlat_var_input_2
|
||
|
)
|
||
|
{
|
||
|
vec4 col_3;
|
||
|
vec4 tmpvar_4;
|
||
|
tmpvar_4 = texture2D (_MainTex, xlat_var_input_2.uv);
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = tmpvar_4;
|
||
|
col_3 = tmpvar_5;
|
||
|
vec3 tmpvar_6;
|
||
|
tmpvar_6 = (col_3.xyz * xlat_var_input_2.color.xyz);
|
||
|
col_3.xyz = tmpvar_6.xyz.xyz;
|
||
|
xll_clip (col_3.w);
|
||
|
return col_3;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
v2f xlt_xlat_var_input_7;
|
||
|
vec4 xl_retval_8;
|
||
|
vec4 tmpvar_9;
|
||
|
tmpvar_9 = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
xlt_xlat_var_input_7.pos = tmpvar_9;
|
||
|
float tmpvar_10;
|
||
|
tmpvar_10 = xlv_FOG.x;
|
||
|
xlt_xlat_var_input_7.fog = tmpvar_10;
|
||
|
vec4 tmpvar_11;
|
||
|
tmpvar_11 = gl_Color.xyzw;
|
||
|
vec4 tmpvar_12;
|
||
|
tmpvar_12 = tmpvar_11;
|
||
|
xlt_xlat_var_input_7.color = tmpvar_12;
|
||
|
vec2 tmpvar_13;
|
||
|
tmpvar_13 = gl_TexCoord[0].xy;
|
||
|
vec2 tmpvar_14;
|
||
|
tmpvar_14 = tmpvar_13;
|
||
|
xlt_xlat_var_input_7.uv = tmpvar_14;
|
||
|
vec4 tmpvar_15;
|
||
|
tmpvar_15 = frag (xlt_xlat_var_input_7);
|
||
|
vec4 tmpvar_16;
|
||
|
tmpvar_16 = tmpvar_15;
|
||
|
xl_retval_8 = tmpvar_16;
|
||
|
vec4 tmpvar_17;
|
||
|
tmpvar_17 = xl_retval_8.xyzw;
|
||
|
vec4 tmpvar_18;
|
||
|
tmpvar_18 = tmpvar_17;
|
||
|
gl_FragData[0] = tmpvar_18;
|
||
|
}
|
||
|
|