[Bf-blender-cvs] [8ca72509820] master: Fix T91911: error in image dithering code after recent changes
Brecht Van Lommel
noreply at git.blender.org
Mon Oct 4 14:09:53 CEST 2021
Commit: 8ca7250982087c137370f72c6b2de91c7ce09e91
Author: Brecht Van Lommel
Date: Mon Oct 4 12:09:59 2021 +0200
Branches: master
https://developer.blender.org/rB8ca7250982087c137370f72c6b2de91c7ce09e91
Fix T91911: error in image dithering code after recent changes
Thanks to Patrik Olsson for spotting this.
===================================================================
M source/blender/blenlib/intern/math_color_inline.c
===================================================================
diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c
index 8b3e3b11cff..24c4143e587 100644
--- a/source/blender/blenlib/intern/math_color_inline.c
+++ b/source/blender/blenlib/intern/math_color_inline.c
@@ -329,7 +329,7 @@ MINLINE float dither_random_value(float s, float t)
hash0 -= floorf(hash0);
hash1 -= floorf(hash1);
/* Convert uniform distribution into triangle-shaped distribution. */
- return hash0 + hash0 - 0.5f;
+ return hash0 + hash1 - 0.5f;
}
MINLINE void float_to_byte_dither_v3(
More information about the Bf-blender-cvs
mailing list