25 lines
517 B
C++
25 lines
517 B
C++
#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
|