cleanup World references

This commit is contained in:
MihailRis 2026-06-20 22:17:27 +03:00
parent ac00c561ee
commit c73b036099
18 changed files with 45 additions and 45 deletions

View file

@ -99,7 +99,7 @@ void Shadows::setup(Shader& shader, const Weather& weather) {
if (!shadows) {
return;
}
const auto& worldInfo = level.getWorld()->getInfo();
const auto& worldInfo = level.getWorld().getInfo();
float cloudsIntensity = weather.clouds();
float shadowsOpacity = 1.0f - cloudsIntensity;
shadowsOpacity *= glm::sqrt(glm::abs(
@ -158,8 +158,8 @@ void Shadows::generateShadowsMap(
float scale,
const std::function<void(Camera&)>& renderShadowPass
) {
auto world = level.getWorld();
const auto& worldInfo = world->getInfo();
const auto& world = level.getWorld();
const auto& worldInfo = world.getInfo();
int resolution = shadowMap.getResolution();
float shadowMapScale = 0.32f / (1 << glm::max(0, quality)) * scale;