Fix ambient handling.
This commit is contained in:
parent
54c9f32033
commit
41cca2e56e
@ -669,7 +669,6 @@ void Camera::activate()
|
||||
{
|
||||
irr::scene::ISceneManager *sm = irr_driver->getSceneManager();
|
||||
sm->setActiveCamera(m_camera);
|
||||
sm->setAmbientLight(m_ambient_light);
|
||||
irr_driver->getVideoDriver()->setViewPort(m_viewport);
|
||||
|
||||
} // activate
|
||||
|
@ -1623,15 +1623,13 @@ void IrrDriver::onUnloadWorld()
|
||||
*/
|
||||
void IrrDriver::setAmbientLight(const video::SColorf &light)
|
||||
{
|
||||
printf("redval %f\n", light.getRed());
|
||||
m_scene_manager->setAmbientLight(light);
|
||||
m_ambient = light;
|
||||
m_SH_dirty = true;
|
||||
} // setAmbientLight
|
||||
|
||||
video::SColorf IrrDriver::getAmbientLight() const
|
||||
{
|
||||
return m_ambient;
|
||||
return m_scene_manager->getAmbientLight();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -341,7 +341,6 @@ private:
|
||||
std::vector<BloomData> m_forcedbloom;
|
||||
|
||||
std::vector<scene::ISceneNode *> m_background;
|
||||
video::SColorf m_ambient;
|
||||
|
||||
STKRenderingPass m_phase;
|
||||
|
||||
|
@ -485,7 +485,7 @@ void IrrDriver::generateDiffuseCoefficients()
|
||||
int sh_w = 16;
|
||||
int sh_h = 16;
|
||||
|
||||
video::SColor ambient = m_ambient.toSColor();
|
||||
video::SColor ambient = m_scene_manager->getAmbientLight().toSColor();
|
||||
|
||||
unsigned char *sh_rgba[6];
|
||||
for (unsigned i = 0; i < 6; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user