MCPcopy Create free account
hub / github.com/MyGUI/mygui / protectExtremeChannels

Function protectExtremeChannels

MyGUIEngine/src/msdfgen/core/MSDFErrorCorrection.cpp:180–187  ·  view source on GitHub ↗

Marks texel as protected if one of its non-median channels is present in the channel mask.

Source from the content-addressed store, hash-verified

178
179/// Marks texel as protected if one of its non-median channels is present in the channel mask.
180static void protectExtremeChannels(byte *stencil, const float *msd, float m, int mask) {
181 if (
182 (mask&RED && msd[0] != m) ||
183 (mask&GREEN && msd[1] != m) ||
184 (mask&BLUE && msd[2] != m)
185 )
186 *stencil |= (byte) MSDFErrorCorrection::PROTECTED;
187}
188
189template <int N>
190void MSDFErrorCorrection::protectEdges(const BitmapConstSection<float, N> &sdf) {

Callers 1

protectEdgesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected