Skip to content

Commit

Permalink
Fix the shader for some Macs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bawr committed Nov 17, 2022
1 parent 982b2f2 commit e462a87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gles3/shaders/tonemap.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e462a87

Please sign in to comment.