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

Method Tr2PostProcessRenderer

trinity/PostProcess/Tr2PostProcessRenderer.cpp:519–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519Tr2PostProcessRenderer::Tr2PostProcessRenderer( IRoot* lockobj ) :
520 m_quality( PostProcess::HIGH ),
521 m_lutsEnabled( 0 ),
522 m_vignetteEnabled( false ),
523 m_lastFrameTime( std::numeric_limits<long long>().max() ),
524 m_bloomDebugMode( BloomDebugMode::BLOOM_DEBUG_NONE ),
525 m_useNewBloom( g_newBloom ),
526 m_bokehFrameCounter( 0 ),
527 m_taaFrameCounter( 0 )
528{
529 // tonemapping shader
530 m_tonemappingEffect.CreateInstance();
531 m_tonemappingEffect->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/ToneMapping.fx" );
532
533 // upscaling shaders
534 m_reactiveMaskEffect.CreateInstance();
535 m_reactiveMaskEffect->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/ReactiveMask.fx" );
536
537 m_transparencyMaskEffect.CreateInstance();
538 m_transparencyMaskEffect->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/TransparencyMask.fx" );
539
540 // bloom shaders
541 m_bloomHighPassFilter.CreateInstance();
542 m_bloomHighPassFilter->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/HighPassFilter.fx" );
543
544 m_downSamplerLuminancePreserve.CreateInstance();
545 m_downSamplerLuminancePreserve->StartUpdate();
546 m_downSamplerLuminancePreserve->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/Downsample.fx" );
547 m_downSamplerLuminancePreserve->SetOption( MEMOIZED_STRING( "LUNINANCE_PRESERVE" ), MEMOIZED_STRING( "LUNINANCE_PRESERVE_ON" ) );
548 m_downSamplerLuminancePreserve->EndUpdate();
549
550 m_downSampler.CreateInstance();
551 m_downSampler->StartUpdate();
552 m_downSampler->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/Downsample.fx" );
553 m_downSampler->SetOption( MEMOIZED_STRING( "LUNINANCE_PRESERVE" ), MEMOIZED_STRING( "LUNINANCE_PRESERVE_OFF" ) );
554 m_downSampler->EndUpdate();
555
556 m_upsamplerHorizontal.CreateInstance();
557 m_upsamplerHorizontal->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/Upsample.fx" );
558
559 m_upsamplerVertical.CreateInstance();
560 m_upsamplerVertical->StartUpdate();
561 m_upsamplerVertical->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/Upsample.fx" );
562 m_upsamplerVertical->SetOption( MEMOIZED_STRING( "UPSAMPLING_STEP" ), MEMOIZED_STRING( "UPSAMPLING_STEP_SECOND" ) );
563 m_upsamplerVertical->EndUpdate();
564
565 m_bloomConstantBuffer = Tr2ConstantBufferAL();
566
567 // dynamic exposure shaders
568 m_dynamicExposureToTextureShader.CreateInstance();
569 m_dynamicExposureToTextureShader->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/ExposureToTexture.fx" );
570
571 m_dynamicExposureCreateHistogramShader.CreateInstance();
572 m_dynamicExposureCreateHistogramShader->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/CreateHistograms.fx" );
573
574 m_dynamicExposureMergeHistogramShader.CreateInstance();
575 m_dynamicExposureMergeHistogramShader->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/MergeHistograms.fx" );
576

Callers

nothing calls this directly

Calls 7

CreateInstanceMethod · 0.80
SetEffectPathNameMethod · 0.80
StartUpdateMethod · 0.80
SetOptionMethod · 0.80
AddResourceTexture2DMethod · 0.80
Tr2ConstantBufferALClass · 0.50
EndUpdateMethod · 0.45

Tested by

no test coverage detected