| 25 | } |
| 26 | |
| 27 | Color 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 | |
| 44 | Color* Tr2CurveColorMixer::Update( Color* in, Be::Time time ) |
| 45 | { |