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

Method GetAvilableSortedLuts

trinity/PostProcess/Tr2PostProcess2.cpp:38–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void Tr2PostProcess2::GetAvilableSortedLuts( std::vector<const Tr2PPLutEffect*>& container, PostProcess::Quality qualitySetting ) const
39{
40 if( qualitySetting < PostProcess::LOW )
41 {
42 // This will never happen, but it will open for a scenario where we need to have game specific quality settings for each post process effect
43 return;
44 }
45 container.clear();
46 if( m_lut && m_lut->IsActive() )
47 {
48 container.push_back( m_lut );
49 }
50 for( const auto& lut : m_luts )
51 {
52 if( lut->IsActive() )
53 {
54 container.push_back( lut );
55 }
56 }
57 std::sort( container.begin(), container.end(), []( const Tr2PPLutEffect* a, const Tr2PPLutEffect* b ) { return a->m_influence < b->m_influence; } );
58}
59
60void Tr2PostProcess2::AddLut( Tr2PPLutEffectPtr effect )
61{

Callers 2

FromPostProcessMethod · 0.80
RenderTonemappingMethod · 0.80

Calls 3

IsActiveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected