Blender  V2.93
Functions
util_color.h File Reference
#include "util/util_math.h"
#include "util/util_types.h"

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN ccl_device uchar float_to_byte (float val)
 
ccl_device uchar4 color_float_to_byte (float3 c)
 
ccl_device uchar4 color_float4_to_uchar4 (float4 c)
 
ccl_device_inline float3 color_byte_to_float (uchar4 c)
 
ccl_device_inline float4 color_uchar4_to_float4 (uchar4 c)
 
ccl_device float color_srgb_to_linear (float c)
 
ccl_device float color_linear_to_srgb (float c)
 
ccl_device float3 rgb_to_hsv (float3 rgb)
 
ccl_device float3 hsv_to_rgb (float3 hsv)
 
ccl_device float3 xyY_to_xyz (float x, float y, float Y)
 
ccl_device float3 color_srgb_to_linear_v3 (float3 c)
 
ccl_device float3 color_linear_to_srgb_v3 (float3 c)
 
ccl_device float4 color_linear_to_srgb_v4 (float4 c)
 
ccl_device float4 color_srgb_to_linear_v4 (float4 c)
 
ccl_device float3 color_highlight_compress (float3 color, float3 *variance)
 
ccl_device float3 color_highlight_uncompress (float3 color)
 

Function Documentation

◆ color_byte_to_float()

ccl_device_inline float3 color_byte_to_float ( uchar4  c)

Definition at line 58 of file util_color.h.

References Freestyle::c, and make_float3.

◆ color_float4_to_uchar4()

ccl_device uchar4 color_float4_to_uchar4 ( float4  c)

Definition at line 46 of file util_color.h.

References Freestyle::a, Freestyle::c, float_to_byte(), make_uchar4, and r.

Referenced by attr_create_vertex_color().

◆ color_float_to_byte()

ccl_device uchar4 color_float_to_byte ( float3  c)

Definition at line 35 of file util_color.h.

References Freestyle::c, float_to_byte(), make_uchar4, and r.

◆ color_highlight_compress()

ccl_device float3 color_highlight_compress ( float3  color,
float3 variance 
)

Definition at line 278 of file util_color.h.

References log3(), one_float3(), and sqr3().

Referenced by kernel_filter_detect_outliers(), and DenoiseTask::load_input_pixels().

◆ color_highlight_uncompress()

ccl_device float3 color_highlight_uncompress ( float3  color)

Definition at line 287 of file util_color.h.

References exp3(), and one_float3().

Referenced by RenderBuffers::get_denoising_pass_rect(), and kernel_filter_finalize().

◆ color_linear_to_srgb()

ccl_device float color_linear_to_srgb ( float  c)

Definition at line 77 of file util_color.h.

References Freestyle::c, and powf.

Referenced by color_linear_to_srgb_v3(), color_linear_to_srgb_v4(), and film_map().

◆ color_linear_to_srgb_v3()

ccl_device float3 color_linear_to_srgb_v3 ( float3  c)

Definition at line 251 of file util_color.h.

References Freestyle::c, color_linear_to_srgb(), and make_float3.

◆ color_linear_to_srgb_v4()

ccl_device float4 color_linear_to_srgb_v4 ( float4  c)

Definition at line 257 of file util_color.h.

References Freestyle::c, color_linear_to_srgb(), and make_float4.

◆ color_srgb_to_linear()

ccl_device float color_srgb_to_linear ( float  c)

Definition at line 69 of file util_color.h.

References Freestyle::c, and powf.

Referenced by color_srgb_to_linear_v3(), and color_srgb_to_linear_v4().

◆ color_srgb_to_linear_v3()

ccl_device float3 color_srgb_to_linear_v3 ( float3  c)

Definition at line 245 of file util_color.h.

References Freestyle::c, color_srgb_to_linear(), and make_float3.

◆ color_srgb_to_linear_v4()

ccl_device float4 color_srgb_to_linear_v4 ( float4  c)

◆ color_uchar4_to_float4()

ccl_device_inline float4 color_uchar4_to_float4 ( uchar4  c)

◆ float_to_byte()

CCL_NAMESPACE_BEGIN ccl_device uchar float_to_byte ( float  val)

Definition at line 29 of file util_color.h.

Referenced by color_float4_to_uchar4(), and color_float_to_byte().

◆ hsv_to_rgb()

ccl_device float3 hsv_to_rgb ( float3  hsv)

Definition at line 127 of file util_color.h.

References floorf, make_float3, t, v, float3::x, float3::y, and float3::z.

◆ rgb_to_hsv()

ccl_device float3 rgb_to_hsv ( float3  rgb)

Definition at line 85 of file util_color.h.

References Freestyle::c, fmaxf, make_float3, min, v, float3::x, float3::y, and float3::z.

◆ xyY_to_xyz()

ccl_device float3 xyY_to_xyz ( float  x,
float  y,
float  Y 
)

Definition at line 168 of file util_color.h.

References make_float3, x, X, Y, y, and Z.