mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 23:07:38 +01:00
Take the ambient occlusion into the lighting and add a probe of the cab
This commit is contained in:
@@ -502,6 +502,18 @@ gfx::local_lights::section_data const &gfx::local_lights::model_bounds(TModel3d
|
||||
return m_models.emplace(Model, data).first->second;
|
||||
}
|
||||
|
||||
bool gfx::local_lights::cab_bounds(TModel3d *Cab, gfx::geometrybank_manager const &Geometry, glm::vec3 &Center, glm::vec3 &Extent)
|
||||
{
|
||||
if (Cab == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
auto const &bounds{model_bounds(Cab, Geometry)};
|
||||
Center = bounds.center;
|
||||
Extent = bounds.extent;
|
||||
return (bounds.extent != glm::vec3{0.f});
|
||||
}
|
||||
|
||||
std::string gfx::local_lights::info() const
|
||||
{
|
||||
return "local lights: " + std::to_string(m_lights.size()) + " (scenery " + std::to_string(m_scenerycount) + ", vehicles " + std::to_string(m_vehiclecount) + ", compartments " +
|
||||
|
||||
Reference in New Issue
Block a user