5 float sShift = sweep * 0.004f + 0.005f;
9 gNoiseMat.SetGradientPeriod(0.5f + sweep * 12.0f);
20 return sNoise.GetRGB(position, normal, uvw);
A dynamic material generating a rainbow effect using simplex noise.
Abstract base class for rendering materials.
Represents an RGB color and provides methods for manipulation.
GradientMaterial< 4 > gNoiseMat
Gradient material for simplex noise.
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 in the material.
void Update(float ratio)
Updates the material animation based on the time ratio.
FunctionGenerator fGenMatGradient
Function to animate gradient properties.
SimplexNoise< 4 > sNoise
Simplex noise generator.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.