diff options
author | Iyad Ahmed <iyadahmed2001> | 2021-05-21 07:55:47 +0300 |
---|---|---|
committer | Ankit Meel <ankitjmeel@gmail.com> | 2021-05-21 07:55:47 +0300 |
commit | a43c7538b802c64ae2443fd8e355756948716e8b (patch) | |
tree | 63b8653d3f31053e3a11a9cebcfa71104e419d1d /source/blender/nodes/shader/node_shader_util.c | |
parent | b18d5dac53f965dfc48a3291b14bbe84b2cd7ac0 (diff) |
Eevee Wavelength Node Support
This patch adds wavelength node support to Eevee, similar to how
Eevee Blackbody node works, thus it is a little off from Cycles.
Reviewed By: #eevee_viewport, fclem, brecht
Differential Revision: https://developer.blender.org/D11326
Diffstat (limited to 'source/blender/nodes/shader/node_shader_util.c')
-rw-r--r-- | source/blender/nodes/shader/node_shader_util.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c index 04c32574a65..67ed7ddd76e 100644 --- a/source/blender/nodes/shader/node_shader_util.c +++ b/source/blender/nodes/shader/node_shader_util.c @@ -332,3 +332,17 @@ void node_shader_gpu_tex_mapping(GPUMaterial *mat, } } } + +void get_XYZ_to_RGB_for_gpu(XYZ_to_RGB *data) +{ + const float *xyz_to_rgb = IMB_colormangement_get_xyz_to_rgb(); + data->r[0] = xyz_to_rgb[0]; + data->r[1] = xyz_to_rgb[3]; + data->r[2] = xyz_to_rgb[6]; + data->g[0] = xyz_to_rgb[1]; + data->g[1] = xyz_to_rgb[4]; + data->g[2] = xyz_to_rgb[7]; + data->b[0] = xyz_to_rgb[2]; + data->b[1] = xyz_to_rgb[5]; + data->b[2] = xyz_to_rgb[8]; +} |