Arctic Engine
Designed to give you control and not take anything away.
Color processing
Collaboration diagram for Color processing:

Classes

struct  arctic::Rgb
 
struct  arctic::Rgba
 

Functions

Rgba arctic::Bilerp (Rgba a, Rgba b, Rgba c, Rgba d, Si32 ax, Si32 ay)
 Interpolate color in a bi-linear way. More...
 
Rgba arctic::BlendFast (Rgba c1, Rgba c2)
 
Rgba arctic::Clamp (const Rgba rgba, const Rgba mi, const Rgba ma)
 
Rgba arctic::GetGray (Rgba c)
 
Rgba arctic::Lerp (Rgba c1, Rgba c2, Si32 alpha_1_8)
 
Rgba arctic::Max (const Rgba a, const Rgba b)
 
Rgba arctic::Min (const Rgba a, const Rgba b)
 
Rgba arctic::Mix (Rgba c1, Rgba c2, Ui32 alpha_1_8)
 
Rgba arctic::Mix (Rgba const &a, Rgba const &b, float const f)
 
Rgba arctic::Mix (Rgba const a, Rgba const b, float const f)
 
Rgba arctic::Scale (Rgba c, Ui32 alpha_1_8)
 

Detailed Description

Function Documentation

◆ Bilerp()

Rgba arctic::Bilerp ( Rgba  a,
Rgba  b,
Rgba  c,
Rgba  d,
Si32  ax,
Si32  ay 
)
inline

Interpolate color in a bi-linear way.

Bilerp calculates the color at point P:

^y
256+ c d
|
ay+.....P
| .
0+ a . b
+-+---+--+-->x
0 ax 256