mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
56 lines
1.2 KiB
Text
56 lines
1.2 KiB
Text
struct v2f {
|
|
vec4 vertex;
|
|
vec4 color;
|
|
vec2 texcoord;
|
|
};
|
|
uniform vec4 _TintColor;
|
|
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 = (((_TintColor.xyz * tex_3.xyz) * i_1.color.xyz) * 2.0);
|
|
col_2.xyz = tmpvar_6.xyz.xyz;
|
|
float tmpvar_7;
|
|
tmpvar_7 = ((1.0 - tex_3.w) * ((_TintColor.w * i_1.color.w) * 2.0));
|
|
col_2.w = vec4(tmpvar_7).w;
|
|
return col_2;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
v2f xlt_i_8;
|
|
vec4 xl_retval_9;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = vec4(0.0, 0.0, 0.0, 0.0);
|
|
xlt_i_8.vertex = tmpvar_10;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11 = gl_Color.xyzw;
|
|
vec4 tmpvar_12;
|
|
tmpvar_12 = tmpvar_11;
|
|
xlt_i_8.color = tmpvar_12;
|
|
vec2 tmpvar_13;
|
|
tmpvar_13 = gl_TexCoord[0].xy;
|
|
vec2 tmpvar_14;
|
|
tmpvar_14 = tmpvar_13;
|
|
xlt_i_8.texcoord = tmpvar_14;
|
|
vec4 tmpvar_15;
|
|
tmpvar_15 = frag (xlt_i_8);
|
|
vec4 tmpvar_16;
|
|
tmpvar_16 = tmpvar_15;
|
|
xl_retval_9 = tmpvar_16;
|
|
vec4 tmpvar_17;
|
|
tmpvar_17 = xl_retval_9.xyzw;
|
|
vec4 tmpvar_18;
|
|
tmpvar_18 = tmpvar_17;
|
|
gl_FragData[0] = tmpvar_18;
|
|
}
|
|
|