MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetValue

Method GetValue

trinity/Curves/Tr2CurveColorMixer.cpp:27–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27Color Tr2CurveColorMixer::GetValue( double time ) const
28{
29 Color out = Lerp( m_color1, m_color2, m_lerpValue );
30
31 if( m_saturation == 1.f )
32 {
33 return out * m_brightness;
34 }
35
36 // color intensity
37 float i = ( out.r * 0.299f ) + ( out.g * 0.587f ) + ( out.b * 0.114f );
38
39 out = Lerp( Color( i, i, i, i ), out, max( 0.0f, m_saturation ) );
40
41 return out * m_brightness;
42}
43
44Color* Tr2CurveColorMixer::Update( Color* in, Be::Time time )
45{

Callers

nothing calls this directly

Calls 1

LerpFunction · 0.85

Tested by

no test coverage detected