#include "EyeLightShader.hxx"
+#include "Primitive.hxx"
EyeLightShader::EyeLightShader(Scene* scene,
const Vec3f& color)
Vec3f
EyeLightShader::Shade(Ray& ray)
{
- return Vec3f();
+ Vec3f N = ray.hit()->GetNormal(ray);
+ float cos_phi = fabs(ray.direction().dot(N));
+
+ return m_color * cos_phi;
}