mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
59 lines
1.2 KiB
Text
59 lines
1.2 KiB
Text
struct v2f {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
};
|
|
uniform sampler2D _MainTex;
|
|
vec4 frag (
|
|
in v2f i_1
|
|
)
|
|
{
|
|
vec4 col_2;
|
|
vec4 tex_3;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = texture2D (_MainTex, i_1.texcoord);
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = tmpvar_4;
|
|
tex_3 = tmpvar_5;
|
|
vec3 tmpvar_6;
|
|
tmpvar_6 = ((tex_3.xyz * i_1.color.xyz) * 2.0);
|
|
col_2.xyz = tmpvar_6.xyz.xyz;
|
|
float tmpvar_7;
|
|
tmpvar_7 = (i_1.color.w * tex_3.w);
|
|
col_2.w = vec4(tmpvar_7).w;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8 = vec4(col_2.w);
|
|
vec4 tmpvar_9;
|
|
tmpvar_9 = mix (vec4(0.5, 0.5, 0.5, 0.5), col_2, tmpvar_8);
|
|
return tmpvar_9;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
v2f xlt_i_10;
|
|
vec4 xl_retval_11;
|
|
vec4 tmpvar_12;
|
|
tmpvar_12 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
xlt_i_10.vertex = tmpvar_12;
|
|
vec4 tmpvar_13;
|
|
tmpvar_13 = gl_Color.xyzw;
|
|
vec4 tmpvar_14;
|
|
tmpvar_14 = tmpvar_13;
|
|
xlt_i_10.color = tmpvar_14;
|
|
vec2 tmpvar_15;
|
|
tmpvar_15 = gl_TexCoord[0].xy;
|
|
vec2 tmpvar_16;
|
|
tmpvar_16 = tmpvar_15;
|
|
xlt_i_10.texcoord = tmpvar_16;
|
|
vec4 tmpvar_17;
|
|
tmpvar_17 = frag (xlt_i_10);
|
|
vec4 tmpvar_18;
|
|
tmpvar_18 = tmpvar_17;
|
|
xl_retval_11 = tmpvar_18;
|
|
vec4 tmpvar_19;
|
|
tmpvar_19 = xl_retval_11.xyzw;
|
|
vec4 tmpvar_20;
|
|
tmpvar_20 = tmpvar_19;
|
|
gl_FragData[0] = tmpvar_20;
|
|
}
|
|
|