diff options
author | Hallam Roberts <MysteryPancake> | 2022-03-21 15:18:22 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-03-21 15:20:06 +0300 |
commit | c5456819ee4904b6b1ec59b3f4ef705d29f170ac (patch) | |
tree | 3086830924b5aa32c9e1b3a25a5d326c0da1a8f3 /source/blender/draw/engines/eevee | |
parent | ae2172955785e22565e6893054d5659bac834470 (diff) |
Fix T96655: Bloom crashes Eevee
This patch fixes T96655, bloom crashing Eevee.
The error occurs because rB472fc0c55848b2e2d428cfb4f7debb80a4e12081 added `vec3 safe_color(vec3 c)` to `common_math_lib.glsl`.
However, `vec3 safe_color(vec3 c)` already exists in `effect_bloom_frag.glsl`.
This means `vec3 safe_color(vec3 c)` is duplicated within `common_math_lib.glsl` and `effect_bloom_frag.glsl`.
{F12938060 size=full}
The duplicate code in `effect_bloom_frag.glsl` can be removed since it's no longer needed.
(I checked the remaining methods, there shouldn't be any additional duplicate code)
Reviewed By: fclem
Maniphest Tasks: T96655
Differential Revision: https://developer.blender.org/D14396
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/effect_bloom_frag.glsl | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_bloom_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_bloom_frag.glsl index c6f61d1d443..9d9d7beb3cb 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_bloom_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_bloom_frag.glsl @@ -50,12 +50,6 @@ out vec4 FragColor; /* -------------- Utils ------------- */ -vec3 safe_color(vec3 c) -{ - /* Clamp to avoid black square artifacts if a pixel goes NaN. */ - return clamp(c, vec3(0.0), vec3(1e20)); /* 1e20 arbitrary. */ -} - /* 3-tap median filter */ vec3 median(vec3 a, vec3 b, vec3 c) { |