From 9121a3281a6916acb609eecab0a5063b446e0d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?arvid=20schr=C3=B6der?= Date: Mon, 12 Dec 2022 20:24:08 +0100 Subject: [PATCH] Fixed only phong merge --- shader/phongshader.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/shader/phongshader.cpp b/shader/phongshader.cpp index 5c31218..cc1220f 100644 --- a/shader/phongshader.cpp +++ b/shader/phongshader.cpp @@ -31,16 +31,5 @@ Color PhongShader::shade(Scene const &scene, Ray const &ray) const { fragmentColor += specular * illum.color; } } - - for (auto &light: scene.lights()) { - auto illum = light->illuminate(scene, ray); - - Vector3d reflection = 2 * dotProduct(illum.direction, ray.normal) * ray.normal - illum.direction; - Color diffuse = diffuseCoefficient * dotProduct(illum.direction, -ray.normal) * diffuseColor; - Color specular = specularCoefficient * specularColor - * std::pow(dotProduct(ray.direction, reflection), shininessExponent); - fragmentColor += illum.color * diffuse + illum.color * specular; - } - - return fragmentColor; + return fragmentColor; }