MCPcopy Create free account
hub / github.com/FastLED/FastLED / getSuperSample

Function getSuperSample

examples/Fx/FxWave2d/wavefx.cpp:139–152  ·  view source on GitHub ↗

Convert the UI slider value to the appropriate SuperSample enum value SuperSample controls the quality of the wave simulation (higher = better quality but more CPU)

Source from the content-addressed store, hash-verified

137// Convert the UI slider value to the appropriate SuperSample enum value
138// SuperSample controls the quality of the wave simulation (higher = better quality but more CPU)
139fl::SuperSample getSuperSample() {
140 switch (int(superSample)) {
141 case 0:
142 return fl::SuperSample::SUPER_SAMPLE_NONE; // No supersampling (fastest, lowest quality)
143 case 1:
144 return fl::SuperSample::SUPER_SAMPLE_2X; // 2x supersampling (2x2 grid = 4 samples per pixel)
145 case 2:
146 return fl::SuperSample::SUPER_SAMPLE_4X; // 4x supersampling (4x4 grid = 16 samples per pixel)
147 case 3:
148 return fl::SuperSample::SUPER_SAMPLE_8X; // 8x supersampling (8x8 grid = 64 samples per pixel, slowest)
149 default:
150 return fl::SuperSample::SUPER_SAMPLE_NONE; // Default fallback
151 }
152}
153
154// Create a ripple effect at a random position within the central area of the display
155void triggerRipple() {

Callers 1

uiFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected