Skip to content

Commit

Permalink
Fixed issue with ray tracer when computing specular component.
Browse files Browse the repository at this point in the history
SteveMaas1978 committed Jan 17, 2025
1 parent e96d0e4 commit 3f85684
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RTLib/RayTracer.cpp
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit 3f85684

Please sign in to comment.