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

Function ApplyLuts

trinity/PostProcess/Tr2PostProcessRenderer.cpp:415–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415void 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
433void ApplyAcesTonemappingMethod( const Tr2PPTonemappingEffect* tonemapping, Tr2Effect* tonemappingEffect )
434{

Callers 1

RenderTonemappingMethod · 0.85

Calls 5

to_stringFunction · 0.85
sizeMethod · 0.80
SetOptionMethod · 0.80
SetResourceTexture2DMethod · 0.80
SetParameterMethod · 0.45

Tested by

no test coverage detected