diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-01-29 21:23:45 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-01-29 21:23:57 +0300 |
commit | ebc064f5c0c9bc5a5f67c82ea564bf170d135bd0 (patch) | |
tree | 10d09df96b5d5bc0b0c958ae328cdddd19e6f4a7 /source/blender/blenlib/BLI_math_color.h | |
parent | 12a38abac6696992bc383a7745c4e15b316936d1 (diff) |
Gooseberry request: Dithering support for byte images when painting on
projection painting (2D will be separate commit).
Diffstat (limited to 'source/blender/blenlib/BLI_math_color.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_color.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 5c14ac55492..560ebe3d390 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -141,6 +141,10 @@ void xyz_to_lab(float x, float y, float z, float *l, float *a, float *b); MINLINE int compare_rgb_uchar(const unsigned char a[3], const unsigned char b[3], const int limit); +MINLINE float dither_random_value(float s, float t); +MINLINE void float_to_byte_dither_v3(unsigned char b[3], const float f[3], float dither, float s, float t); + + #define rgba_char_args_set_fl(col, r, g, b, a) \ rgba_char_args_set(col, (r) * 255, (g) * 255, (b) * 255, (a) * 255) |