From e462a87447f6ccef4eca65873d88dfa3cc3e11f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wr=C3=B3blewski?= Date: Thu, 17 Nov 2022 15:58:07 -0800 Subject: [PATCH] Fix the shader for some Macs. --- drivers/gles3/shaders/tonemap.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl index 48bb56184008..a9a5eea1f2cf 100644 --- a/drivers/gles3/shaders/tonemap.glsl +++ b/drivers/gles3/shaders/tonemap.glsl @@ -477,8 +477,8 @@ void main() { #ifdef USE_ALPHA_DEPTH_CHANNEL highp float depth = textureLod(sdepth, uv_interp, 0.0f).r; - const float d_min = 0.01f; // camera near - const float d_max = 1000f; // camera far + const float d_min = 0.01f; // camera near + const float d_max = 1000.0f; // camera far depth = d_min / ((1.0 - depth) + (d_min / d_max)); depth = clamp(1.0 / (depth + 0.5), 0.0, 1.0); #else