mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
fix ssao
This commit is contained in:
parent
021cfd8a1e
commit
3e66ff5924
4 changed files with 9 additions and 5 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue