renderer/metal: demonstrate alpha "gain" for thickening fonts

This commit is contained in:
Aljoscha Krettek
2025-01-06 15:00:44 +01:00
parent e90f667b69
commit 3d3f2127a9

View File

@ -365,6 +365,12 @@ fragment float4 cell_text_fragment(
// Then premult the texture color
float a = textureGrayscale.sample(textureSampler, in.tex_coord).r;
// Demonstrate how we can thicken fonts by applying some "gain" to the
// alpha we get from the texture.
//
// We could make this a configurable knob.
a = pow(a, 1 / 3.0f);
premult = premult * a;
return premult;