| 413 | } |
| 414 | |
| 415 | void ApplyLuts( std::vector<const Tr2PPLutEffect*>& luts, Tr2Effect* tonemappingEffect ) |
| 416 | { |
| 417 | if( luts.size() > 0 ) |
| 418 | { |
| 419 | tonemappingEffect->SetOption( MEMOIZED_STRING( "LUT_TOGGLE" ), MEMOIZED_STRING( "LUT_ENABLED" ) ); |
| 420 | |
| 421 | for( uint32_t i = 0; i < MAX_LUTS; i++ ) |
| 422 | { |
| 423 | tonemappingEffect->SetParameter( BlueSharedString( "LUTInfluence_" + std::to_string( i ) ), i < luts.size() ? luts[i]->m_influence : 0.0f ); |
| 424 | tonemappingEffect->SetResourceTexture2D( BlueSharedString( "TexLUT_" + std::to_string( i ) ), i < luts.size() ? luts[i]->m_path.c_str() : "" ); |
| 425 | } |
| 426 | } |
| 427 | else |
| 428 | { |
| 429 | tonemappingEffect->SetOption( BlueSharedString( "LUT_TOGGLE" ), BlueSharedString( "LUT_DISABLED" ) ); |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | void ApplyAcesTonemappingMethod( const Tr2PPTonemappingEffect* tonemapping, Tr2Effect* tonemappingEffect ) |
| 434 | { |
no test coverage detected