cloudy-raytracer/shader/noiseshader.h

26 lines
517 B
C
Raw Permalink Normal View History

2023-01-24 06:26:24 +01:00
#ifndef CG1_TRACER_NOISESHADER_H
#define CG1_TRACER_NOISESHADER_H
#include <memory>
#include "shader.h"
#include "common/noise/noise.h"
class NoiseShader : public Shader
{
public:
// Constructor
NoiseShader(std::shared_ptr<Noise> noise, float scale = 1, Vector3d offset = Vector3d(0, 0, 0));
// Shader functions
Color shade(Scene const &scene, Ray const &ray) const override;
private:
float scale;
Vector3d offset;
std::shared_ptr<Noise> noise;
};
#endif //CG1_TRACER_NOISESHADER_H