mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
52 lines
1,004 B
Text
52 lines
1,004 B
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;
|
||
|
vec3 tmpvar_5;
|
||
|
tmpvar_5 = (prev_2.xyz * prev_2.w);
|
||
|
prev_2.xyz = tmpvar_5.xyz.xyz;
|
||
|
return prev_2;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
v2f xlt_i_6;
|
||
|
vec4 xl_retval_7;
|
||
|
vec4 tmpvar_8;
|
||
|
tmpvar_8 = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
xlt_i_6.vertex = tmpvar_8;
|
||
|
vec4 tmpvar_9;
|
||
|
tmpvar_9 = gl_Color.xyzw;
|
||
|
vec4 tmpvar_10;
|
||
|
tmpvar_10 = tmpvar_9;
|
||
|
xlt_i_6.color = tmpvar_10;
|
||
|
vec2 tmpvar_11;
|
||
|
tmpvar_11 = gl_TexCoord[0].xy;
|
||
|
vec2 tmpvar_12;
|
||
|
tmpvar_12 = tmpvar_11;
|
||
|
xlt_i_6.texcoord = tmpvar_12;
|
||
|
vec4 tmpvar_13;
|
||
|
tmpvar_13 = frag (xlt_i_6);
|
||
|
vec4 tmpvar_14;
|
||
|
tmpvar_14 = tmpvar_13;
|
||
|
xl_retval_7 = tmpvar_14;
|
||
|
vec4 tmpvar_15;
|
||
|
tmpvar_15 = xl_retval_7.xyzw;
|
||
|
vec4 tmpvar_16;
|
||
|
tmpvar_16 = tmpvar_15;
|
||
|
gl_FragData[0] = tmpvar_16;
|
||
|
}
|
||
|
|