3D-Viewer: assign correct copper material based on render plated option.
change plated material intensity.
This commit is contained in:
parent
c44b15e9f5
commit
2aa56e2c86
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2015-2022 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015-2020 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2015-2022 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue