Blender V4.3
COM_ColorBalanceWhitepointOperation.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "BLI_math_color.hh"
6#include "BLI_math_matrix.h"
7
9
11
12namespace blender::compositor {
13
22
32
34{
35 for (; p.out < p.row_end; p.next()) {
36 const float *in_factor = p.ins[0];
37 const float *in_color = p.ins[1];
38 const float fac = std::min(1.0f, in_factor[0]);
39 mul_v4_m4v4(p.out, matrix_.ptr(), in_color);
40 interp_v4_v4v4(p.out, in_color, p.out, fac);
41 }
42}
43
44} // namespace blender::compositor
void mul_v4_m4v4(float r[4], const float mat[4][4], const float v[4])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t)
Definition math_vector.c:45
blender::float3x3 IMB_colormanagement_get_scene_linear_to_xyz()
blender::float3x3 IMB_colormanagement_get_xyz_to_scene_linear()
void add_output_socket(DataType datatype)
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
void set_canvas_input_index(unsigned int index)
set the index of the input socket that will determine the canvas of this operation
float3 whitepoint_from_temp_tint(float temperature, float tint)
float3x3 chromatic_adaption_matrix(const float3 &from_XYZ, const float3 &to_XYZ)
MatBase< float, 4, 4 > float4x4
const c_style_mat & ptr() const