mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-04 21:31:11 -05:00
53 lines
1 KiB
Text
53 lines
1 KiB
Text
|
struct v2f {
|
||
|
vec4 vertex;
|
||
|
vec4 color;
|
||
|
vec2 texcoord;
|
||
|
};
|
||
|
uniform sampler2D _MainTex;
|
||
|
vec4 frag (
|
||
|
in v2f i_1
|
||
|
)
|
||
|
{
|
||
|
vec4 prev_2;
|
||
|
vec4 tmpvar_3;
|
||
|
tmpvar_3 = texture2D (_MainTex, i_1.texcoord);
|
||
|
vec4 tmpvar_4;
|
||
|
tmpvar_4 = (i_1.color * tmpvar_3);
|
||
|
prev_2 = tmpvar_4;
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = vec4(prev_2.w);
|
||
|
vec4 tmpvar_6;
|
||
|
tmpvar_6 = mix (vec4(1.0, 1.0, 1.0, 1.0), prev_2, tmpvar_5);
|
||
|
return tmpvar_6;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
v2f xlt_i_7;
|
||
|
vec4 xl_retval_8;
|
||
|
vec4 tmpvar_9;
|
||
|
tmpvar_9 = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
xlt_i_7.vertex = tmpvar_9;
|
||
|
vec4 tmpvar_10;
|
||
|
tmpvar_10 = gl_Color.xyzw;
|
||
|
vec4 tmpvar_11;
|
||
|
tmpvar_11 = tmpvar_10;
|
||
|
xlt_i_7.color = tmpvar_11;
|
||
|
vec2 tmpvar_12;
|
||
|
tmpvar_12 = gl_TexCoord[0].xy;
|
||
|
vec2 tmpvar_13;
|
||
|
tmpvar_13 = tmpvar_12;
|
||
|
xlt_i_7.texcoord = tmpvar_13;
|
||
|
vec4 tmpvar_14;
|
||
|
tmpvar_14 = frag (xlt_i_7);
|
||
|
vec4 tmpvar_15;
|
||
|
tmpvar_15 = tmpvar_14;
|
||
|
xl_retval_8 = tmpvar_15;
|
||
|
vec4 tmpvar_16;
|
||
|
tmpvar_16 = xl_retval_8.xyzw;
|
||
|
vec4 tmpvar_17;
|
||
|
tmpvar_17 = tmpvar_16;
|
||
|
gl_FragData[0] = tmpvar_17;
|
||
|
}
|
||
|
|