cloudy-raytracer/shader/flatshader.cpp

9 lines
284 B
C++
Raw Permalink Normal View History

2022-11-05 22:08:16 +01:00
#include "shader/flatshader.h"
FlatShader::FlatShader(Color const &objectColor) : objectColor(objectColor) {}
Color FlatShader::shade(Scene const &scene, Ray const &ray) const {
(void)ray; // ray is unused in this case, but we do not want a warning.
return this->objectColor;
}