From 4596a11da2c8b5a0a9411032fe4c2332bf4bc76f Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Fri, 26 Apr 2024 16:01:32 +0300 Subject: [PATCH] Raytracing 3D renderer: don't reflect sky background when reflections are on. Fixes https://gitlab.com/kicad/code/kicad/-/issues/17690 --- 3d-viewer/3d_rendering/raytracing/render_3d_raytrace_base.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/3d-viewer/3d_rendering/raytracing/render_3d_raytrace_base.cpp b/3d-viewer/3d_rendering/raytracing/render_3d_raytrace_base.cpp index 497bae8e15..2fee2c02d4 100644 --- a/3d-viewer/3d_rendering/raytracing/render_3d_raytrace_base.cpp +++ b/3d-viewer/3d_rendering/raytracing/render_3d_raytrace_base.cpp @@ -1570,10 +1570,6 @@ SFVEC4F RENDER_3D_RAYTRACE_BASE::shadeHit( const SFVEC4F& aBgColor, const RAY& a sum_color += add; } - else - { - sum_color += aBgColor; - } } outColor += (sum_color / SFVEC4F( (float)reflection_number_of_samples) );