diff --git a/3d-viewer/3d_rendering/raytracing/create_scene.cpp b/3d-viewer/3d_rendering/raytracing/create_scene.cpp index 15d6fa5678..90a7559b65 100644 --- a/3d-viewer/3d_rendering/raytracing/create_scene.cpp +++ b/3d-viewer/3d_rendering/raytracing/create_scene.cpp @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2015-2016 Mario Luzeiro - * Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2015-2022 Mario Luzeiro + * Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -632,16 +632,21 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe if( m_boardAdapter.m_Cfg->m_Render.realistic ) { if( m_boardAdapter.m_Cfg->m_Render.renderPlatedPadsAsPlated ) + { layerColor = SFVEC3F( 184.0f / 255.0f, 115.0f / 255.0f, 50.0f / 255.0f ); + materialLayer = &m_materials.m_NonPlatedCopper; + } else + { layerColor = m_boardAdapter.m_CopperColor; + materialLayer = &m_materials.m_Copper; + } } else { layerColor = m_boardAdapter.GetLayerColor( layer_id ); } - materialLayer = &m_materials.m_NonPlatedCopper; break; } diff --git a/3d-viewer/3d_rendering/raytracing/material.cpp b/3d-viewer/3d_rendering/raytracing/material.cpp index f0f2fc5016..e06b5632f6 100644 --- a/3d-viewer/3d_rendering/raytracing/material.cpp +++ b/3d-viewer/3d_rendering/raytracing/material.cpp @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2015-2020 Mario Luzeiro - * Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2015-2022 Mario Luzeiro + * Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -223,7 +223,7 @@ SFVEC3F PLATED_COPPER_NORMAL::Generate( const RAY& aRay, const HITINFO& aHitInfo const float noise1 = ( s_perlinNoise.noise( hitPos.x, hitPos.y ) - 0.5f ); const float noise2 = ( s_perlinNoise.noise( hitPos.y, hitPos.x ) - 0.5f ); - return SFVEC3F( noise1, noise2, -( noise1 + noise2 ) ) * 0.02f; + return SFVEC3F( noise1, noise2, 0.0f ) * 0.1f; }