Blender V4.3
color.h File Reference
#include "util/math.h"
#include "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 float byte_to_float (uchar 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 rgb_to_hsl (float3 rgb)
 
ccl_device float3 hsl_to_rgb (float3 hsl)
 
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, ccl_private float3 *variance)
 
ccl_device float3 color_highlight_uncompress (float3 color)
 

Function Documentation

◆ byte_to_float()

ccl_device float byte_to_float ( uchar val)

◆ color_byte_to_float()

ccl_device_inline float3 color_byte_to_float ( uchar4 c)

Definition at line 51 of file util/color.h.

References make_float3(), uchar4::x, uchar4::y, and uchar4::z.

◆ color_float4_to_uchar4()

ccl_device uchar4 color_float4_to_uchar4 ( float4 c)

Definition at line 39 of file util/color.h.

References b, float_to_byte(), and make_uchar4().

◆ color_float_to_byte()

ccl_device uchar4 color_float_to_byte ( float3 c)

Definition at line 28 of file util/color.h.

References b, float_to_byte(), make_uchar4(), float3::x, float3::y, and float3::z.

◆ color_highlight_compress()

ccl_device float3 color_highlight_compress ( float3 color,
ccl_private float3 * variance )

Definition at line 340 of file util/color.h.

References log(), one_float3(), and sqr().

◆ color_highlight_uncompress()

ccl_device float3 color_highlight_uncompress ( float3 color)

Definition at line 349 of file util/color.h.

References exp(), and one_float3().

◆ color_linear_to_srgb()

ccl_device float color_linear_to_srgb ( float c)

Definition at line 72 of file util/color.h.

References powf.

Referenced by color_linear_to_srgb_v3(), and color_linear_to_srgb_v4().

◆ color_linear_to_srgb_v3()

ccl_device float3 color_linear_to_srgb_v3 ( float3 c)

Definition at line 315 of file util/color.h.

References color_linear_to_srgb(), make_float3(), float3::x, float3::y, and float3::z.

Referenced by osl_transformc().

◆ color_linear_to_srgb_v4()

ccl_device float4 color_linear_to_srgb_v4 ( float4 c)

Definition at line 321 of file util/color.h.

References color_linear_to_srgb(), and make_float4().

◆ color_srgb_to_linear()

ccl_device float color_srgb_to_linear ( float c)

Definition at line 62 of file util/color.h.

References 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 309 of file util/color.h.

References color_srgb_to_linear(), make_float3(), float3::x, float3::y, and float3::z.

Referenced by osl_transformc().

◆ color_srgb_to_linear_v4()

◆ 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 17 of file util/color.h.

Referenced by color_float4_to_uchar4(), and color_float_to_byte().

◆ hsl_to_rgb()

ccl_device float3 hsl_to_rgb ( float3 hsl)

Definition at line 205 of file util/color.h.

References clamp(), fabsf, l, make_float3(), float3::x, float3::y, and float3::z.

◆ hsv_to_rgb()

ccl_device float3 hsv_to_rgb ( float3 hsv)

Definition at line 128 of file util/color.h.

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

◆ rgb_to_hsl()

ccl_device float3 rgb_to_hsl ( float3 rgb)

Definition at line 176 of file util/color.h.

References fmaxf, l, make_float3(), min, float3::x, float3::y, and float3::z.

◆ rgb_to_hsv()

ccl_device float3 rgb_to_hsv ( float3 rgb)

Definition at line 82 of file util/color.h.

References 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 226 of file util/color.h.

References make_float3(), X, Y, y, and Z.