33 lines
711 B
C
33 lines
711 B
C
|
#ifndef CG1_TRACER_TONESHADER_H
|
||
|
#define CG1_TRACER_TONESHADER_H
|
||
|
|
||
|
|
||
|
#include "common/color.h"
|
||
|
#include "shader.h"
|
||
|
#include "light/light.h"
|
||
|
#include "scene/scene.h"
|
||
|
|
||
|
class ToneShader : public Shader
|
||
|
{
|
||
|
|
||
|
public:
|
||
|
// Constructor
|
||
|
ToneShader(Color const &highlightColor = Color(1, 1, 1),
|
||
|
Color const &midtoneColor = Color(0.5, 0.5, 0.5),
|
||
|
Color const &shadowColor = Color(0, 0, 0),
|
||
|
float edgeNoise = 1.0f);
|
||
|
|
||
|
// Shader functions
|
||
|
virtual Color shade(Scene const &scene, Ray const &ray) const;
|
||
|
|
||
|
protected:
|
||
|
Color const highlightColor;
|
||
|
Color const midtoneColor;
|
||
|
Color const shadowColor;
|
||
|
|
||
|
float const edgeNoise;
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif //CG1_TRACER_TONESHADER_H
|