Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Emara <mail@OmarEmara.dev>2022-08-10 10:58:44 +0300
committerOmar Emara <mail@OmarEmara.dev>2022-08-10 10:58:44 +0300
commit6109ad6cce9186bd6e8ff4dbfb281ae8f6742119 (patch)
tree4308957d11abb889c2dd17e931f4b97623df4098 /source/blender/imbuf
parent865204fef06b1f4e73a3ad82202fe8221d1efae5 (diff)
Realtime Compositor: Add basic color nodes
This patch implements the following nodes for the realtime compositor: - Alpha over node. - Bright contrast node. - Color balance node. - Color correction node. - Exposure node. - Gamma node. - Hue correct node. - Hue saturation value node. - Invert node. - Mix node. - Posterize node. - Time curve node. - Vector curve node. Differential Revision: https://developer.blender.org/D15228 Reviewed By: Clement Foucault
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/IMB_colormanagement.h2
-rw-r--r--source/blender/imbuf/intern/colormanagement_inline.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h
index 0818dd653a1..2fb1d814c83 100644
--- a/source/blender/imbuf/IMB_colormanagement.h
+++ b/source/blender/imbuf/IMB_colormanagement.h
@@ -56,6 +56,8 @@ bool IMB_colormanagement_space_name_is_data(const char *name);
bool IMB_colormanagement_space_name_is_scene_linear(const char *name);
bool IMB_colormanagement_space_name_is_srgb(const char *name);
+BLI_INLINE void IMB_colormanagement_get_luminance_coefficients(float r_rgb[3]);
+
/**
* Convert a float RGB triplet to the correct luminance weighted average.
*
diff --git a/source/blender/imbuf/intern/colormanagement_inline.c b/source/blender/imbuf/intern/colormanagement_inline.c
index 668307ec802..3c6c0f5fd0a 100644
--- a/source/blender/imbuf/intern/colormanagement_inline.c
+++ b/source/blender/imbuf/intern/colormanagement_inline.c
@@ -11,6 +11,11 @@
#include "BLI_math_vector.h"
#include "IMB_colormanagement_intern.h"
+void IMB_colormanagement_get_luminance_coefficients(float r_rgb[3])
+{
+ copy_v3_v3(r_rgb, imbuf_luma_coefficients);
+}
+
float IMB_colormanagement_get_luminance(const float rgb[3])
{
return dot_v3v3(imbuf_luma_coefficients, rgb);