Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_graphics
Rendering
ColorTransform.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
ivorium_core/ivorium_core.hpp
>
4
5
namespace
iv
6
{
7
12
struct
ColorTransform
13
{
14
// Matrix manipulation
15
static
float4x4
RotateHue
(
float
radians );
16
static
float4x4
ShiftSaturation
(
float
);
17
static
float4x4
ScaleValue
(
float
);
18
19
static
float4x4
ShiftValue
(
float
);
20
21
static
float4x4
Change_Hue
(
float4
from,
float4
to );
22
static
float4x4
Change_Saturation
(
float4
from,
float4
to );
23
static
float4x4
Change_Value
(
float4
from,
float4
to );
24
25
static
float4x4
Change
(
float4
from,
float4
to );
26
27
static
float4x4
Zero
();
28
static
float4x4
Scale
(
float4
sRGB
);
29
static
float4x4
Shift
(
float4
sRGB
);
30
31
// Color manipulation
32
static
float
GetHue
(
float4
color );
33
static
float
GetSaturation
(
float4
color );
34
static
float
GetValue
(
float4
color );
35
36
static
float4
Apply
(
float4x4
transform,
float4
color );
37
38
// Helpers.
39
static
float
sRGB_to_linearRGB
(
float
);
40
static
float4
sRGB_to_linearRGB
(
float4
);
41
42
static
float
linearRGB_to_sRGB
(
float
);
43
static
float4
linearRGB_to_sRGB
(
float4
);
44
45
static
float4
linearRGB_to_HSV
(
float4
);
46
static
float4
HSV_to_linearRGB
(
float4
);
47
};
48
49
}