Skip to content

PlasmaEffect

Source: PlasmaEffect.h

PlasmaEffect

class PlasmaEffect
src/light/effects/PlasmaEffect.h:14

Inherits: EffectBase

Plasma effect: summed sine waves forming rolling blobs.

PlasmaEffect card PlasmaEffect controls

Four sines summed per pixel, or five in a volume, with their average picking the palette index. A larger scale means a smaller per-pixel step, so the blobs grow bigger and calmer.

Public Attributes

uint8_t bpm = 30 : How fast the field rolls.

uint8_t scale_x = 48 : The blobs' size along x, where larger is calmer.

uint8_t scale_y = 48 : Their size along y, which the depth axis reuses.

uint8_t hue_shift = 0 : Walks the whole field around the palette.

Public Methods

virtual inline const char * tags() const override : Catalog tags: MoonLight origin, David Jupijn and Rising Step.

virtual inline Dim dimensions() const override : Volumetric: a fifth sine varies the field along the depth axis.

virtual inline void defineControls() override : Publish the roll speed, both scales and the palette shift.

virtual inline void tick() override : Sum the sines per pixel and read the palette at their average.