12 float sShiftX = sweepX * 0.005f + 0.007f;
13 float sShiftY = sweepY * 0.005f + 0.007f;
14 float sShiftZ = sweepZ * 0.005f + 0.007f;
A dynamic simplex noise gradient material for a lava lamp effect.
FunctionGenerator fGenMatGradientX
Function for x-axis modulation.
FunctionGenerator fGenMatGradientZ
Function for z-axis modulation.
Material * GetMaterial()
Retrieves the associated material.
float simplexNoiseDepth
Depth parameter for simplex noise.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Computes the color at a given position using simplex noise.
FunctionGenerator fGenMatGradientY
Function for y-axis modulation.
RGBColor noiseSpectrum[2]
Gradient colors for the noise material.
void SetGradient(RGBColor color, uint8_t colorIndex)
Sets a specific gradient color.
GradientMaterial< 2 > gNoiseMat
Gradient material for simplex noise.
void Update(float ratio)
Updates the material's state based on the provided time ratio.
SimplexNoise< 2 > sNoise
Simplex noise generator.
FunctionGenerator fGenMatGradientP
Function for gradient property modulation.
float Update()
Updates and calculates the next value of the waveform.
void UpdateGradient(RGBColor *rgbColors)
Updates the colors of the gradient.
void SetGradientPeriod(float gradientPeriod)
Sets the gradient's period of repetition.
Abstract base class for rendering materials.
Represents an RGB color and provides methods for manipulation.
void SetScale(Vector3D noiseScale)
Sets the scale for noise generation.
void SetZPosition(float zPosition)
Sets the Z-position for 3D noise generation.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Retrieves the color for a given position based on the noise value.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.