This commit is contained in:
MihailRis
2025-06-15 02:14:39 +03:00
parent 021cfd8a1e
commit 3e66ff5924
4 changed files with 9 additions and 5 deletions
+6 -1
View File
@@ -378,7 +378,12 @@ void WorldRenderer::generateShadowsMap(
t += 1.0f;
}
t = fmod(t, 0.5f);
float sunAngle = glm::radians(90.0f - (((int)(t*1000)) / 1000.0f + 0.25f) * 360.0f);
float sunCycleStep = 1.0f / 1000.0f;
float sunAngle = glm::radians(
90.0f -
((static_cast<int>(t / sunCycleStep)) * sunCycleStep + 0.25f) * 360.0f
);
shadowCamera.rotate(
sunAngle,
glm::radians(-45.0f),