diff --git a/shaders/denoising.glsl b/shaders/denoising.glsl index 2c909fd..ed01523 100644 --- a/shaders/denoising.glsl +++ b/shaders/denoising.glsl @@ -67,7 +67,7 @@ void main() totalWeight += weight; } } - light * (1.0 / totalWeight); + light *= (1.0 / totalWeight); if (u_pass == u_pass_count - 1) { vec4 color = light * imageLoad(color_texture, pixel_coords); diff --git a/srcs/class/Camera.cpp b/srcs/class/Camera.cpp index 585e6ea..994ced3 100644 --- a/srcs/class/Camera.cpp +++ b/srcs/class/Camera.cpp @@ -112,7 +112,7 @@ int Camera::portalTeleport(Scene *scene, float delta_time, Renderer &renderer) float distance_future_pos = glm::length(future_pos - _position); float distance_portal = glm::length(point_projected - _position); - float imprecision = 0.101f; + float imprecision = 0.1f; if (distance_portal <= distance_future_pos && glm::dot(glm::normalize(future_pos - _position), obj.normal) > 0.0f) { std::cout << "Teleport" << std::endl;