MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ coverage_weight()

constexpr float MayaFlux::Portal::Text::coverage_weight ( uint32_t  slot)
constexprnoexcept

MeshVertex::weight that makes a fragment shader read a texture slot as glyph coverage rather than as an image.

Positive weights select a slot as an image, zero is a flat colour, and a negative weight selects slot -weight - 1 as coverage: the shader outputs the vertex colour with the slot's red channel as alpha (see data/shaders/include/glyph_coverage.glsl).

Parameters
slotZero based index of the atlas image in the shader's texture array.

Definition at line 50 of file GlyphMesh.hpp.

51{
52 return -static_cast<float>(slot + 1);
53}

Referenced by glyph_vertices().

+ Here is the caller graph for this function: