16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 09:59:18 +02:00

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2018-11-11 00:02:59 +01:00
16 changed files with 647 additions and 486 deletions

View File

@@ -2092,16 +2092,7 @@ bool opengl_renderer::Render(TDynamicObject *Dynamic)
// low poly interior
if (FreeFlyModeFlag ? true : !Dynamic->mdKabina || !Dynamic->bDisplayCab)
{
// enable cab light if needed
glm::vec3 old_ambient = light_ubs.ambient;
light_ubs.ambient += Dynamic->InteriorLight * Dynamic->InteriorLightLevel;
light_ubo->update(light_ubs);
Render(Dynamic->mdLowPolyInt, Dynamic->Material(), squaredistance);
// reset the overall ambient
light_ubs.ambient = old_ambient;
light_ubo->update(light_ubs);
}
}
@@ -3125,16 +3116,7 @@ bool opengl_renderer::Render_Alpha(TDynamicObject *Dynamic)
// low poly interior
if (FreeFlyModeFlag ? true : !Dynamic->mdKabina || !Dynamic->bDisplayCab)
{
// crude way to light the cabin, until we have something more complete in place
glm::vec3 old_ambient = light_ubs.ambient;
light_ubs.ambient += Dynamic->InteriorLight * Dynamic->InteriorLightLevel;
light_ubo->update(light_ubs);
Render_Alpha(Dynamic->mdLowPolyInt, Dynamic->Material(), squaredistance);
// restore ambient
light_ubs.ambient = old_ambient;
light_ubo->update(light_ubs);
}
}