Fix ambient light on track not updated
This commit is contained in:
parent
acf0ac909f
commit
4fbce474c5
@ -750,7 +750,7 @@ GLuint ShaderBasedRenderer::getDepthStencilTexture() const
|
|||||||
void ShaderBasedRenderer::setAmbientLight(const video::SColorf &light,
|
void ShaderBasedRenderer::setAmbientLight(const video::SColorf &light,
|
||||||
bool force_SH_computation)
|
bool force_SH_computation)
|
||||||
{
|
{
|
||||||
if(!m_spherical_harmonics->has6Textures() || force_SH_computation)
|
if (force_SH_computation)
|
||||||
m_spherical_harmonics->setAmbientLight(light.toSColor());
|
m_spherical_harmonics->setAmbientLight(light.toSColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1819,7 +1819,8 @@ void Track::loadTrackModel(bool reverse_track, unsigned int mode_id)
|
|||||||
|
|
||||||
// ---- Set ambient color
|
// ---- Set ambient color
|
||||||
m_ambient_color = m_default_ambient_color;
|
m_ambient_color = m_default_ambient_color;
|
||||||
irr_driver->setAmbientLight(m_ambient_color, false);
|
irr_driver->setAmbientLight(m_ambient_color,
|
||||||
|
m_spherical_harmonics_textures.size() != 6/*force_SH_computation*/);
|
||||||
|
|
||||||
// ---- Create sun (non-ambient directional light)
|
// ---- Create sun (non-ambient directional light)
|
||||||
if (m_sun_position.getLengthSQ() < 0.03f)
|
if (m_sun_position.getLengthSQ() < 0.03f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user