3 layout( location = 0 ) in vec2 vTexCoord;
5 layout( set = 0, binding = 1, std140 ) uniform FragData
7 vec4 uTextColorAnimatable;
12 float preMultipliedAlpha;
15 layout( set = 0, binding = 2) uniform sampler2D sTexture;
17 layout( location = 0 ) out vec4 fragColor;
21 return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );
26 vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );
27 float textTexture = texture( sTexture, texCoord ).r;
29 // Set the color of the text to what it is animated to.
30 fragColor = uTextColorAnimatable * textTexture * uColor * visualMixColor();