From 3f85684e3c915361bb8e1dfe425c58ccaf619665 Mon Sep 17 00:00:00 2001 From: SteveMaas1978 Date: Fri, 17 Jan 2025 09:48:34 -0700 Subject: [PATCH] Fixed issue with ray tracer when computing specular component. --- RTLib/RayTracer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RTLib/RayTracer.cpp b/RTLib/RayTracer.cpp index fe677fc01..7fa5d61d6 100644 --- a/RTLib/RayTracer.cpp +++ b/RTLib/RayTracer.cpp @@ -718,7 +718,7 @@ rt::Color RayTracer::castRay(rt::Btree& octree, rt::Ray& ray) double f = H * L; double s = (f > 0 ? pow(f, mat.shininess) : 0); spec = Color(s, s, s); - fragCol = (fragCol + spec) * 0.8; + fragCol += spec * 0.8; } fragCol.a() = c.a(); }