17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 08:39:19 +02:00

feat(render): ambient occlusion with bent normals darkens only the light of the surroundings instead of the whole image, so the sun and headlights keep their full strength; the occlusion and the bent normal of the previous frame are reprojected into the lighting of the scene, with the motion of the camera and of every vehicle and cab taken into account and with depth checks against disocclusion, the ambient light follows how much of the sky the bent normal sees, and reflections of the environment are occluded where the cone of visible directions around the bent normal cuts off the reflected lobe, only where the occlusion is clear enough that open flat panels and windows keep their grazing reflections

This commit is contained in:
maj00r
2026-10-14 18:02:35 +02:00
parent a24f9fae3f
commit 806dde70bf
12 changed files with 194 additions and 53 deletions

View File

@@ -347,6 +347,7 @@ void gl::program::init()
glUniform1i(glGetUniformLocation(*this, "shadowmap"), gl::SHADOW_TEX);
glUniform1i(glGetUniformLocation(*this, "envmap"), gl::ENV_TEX);
glUniform1i(glGetUniformLocation(*this, "headlightmap"), gl::HEADLIGHT_TEX);
glUniform1i(glGetUniformLocation(*this, "gtaomap"), gl::GTAO_TEX);
GLuint index;