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

Method RenderBloomDebug

trinity/PostProcess/Tr2PostProcessRenderer.cpp:1115–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1113}
1114
1115Tr2GpuResourcePool::Texture Tr2PostProcessRenderer::RenderBloomDebug(
1116 std::array<Tr2GpuResourcePool::Texture, Bloom::MAX_BLOOM_STEPS>& downsample,
1117 std::array<Tr2GpuResourcePool::Texture, Bloom::MAX_BLOOM_STEPS>& upsample,
1118 Tr2GpuResourcePool::Texture& blitCurrent,
1119 Tr2GpuResourcePool& gpuResourcePool,
1120 Tr2RenderContext& renderContext )
1121{
1122 if( m_bloomDebugShader == nullptr )
1123 {
1124 m_bloomDebugShader.CreateInstance();
1125 m_bloomDebugShader->StartUpdate();
1126 m_bloomDebugShader->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/PostProcess/BloomDebug.fx" );
1127 m_bloomDebugShader->EndUpdate();
1128 }
1129 GPU_REGION( renderContext, "Bloom Debug" );
1130
1131 m_bloomDebugShader->SetOption( MEMOIZED_STRING( "BLOOM_DEBUG_MODE" ), GetBloomDebugShaderOptionValue( m_bloomDebugMode ) );
1132 m_bloomDebugShader->SetParameter( MEMOIZED_STRING( "BlitCurrent" ), blitCurrent );
1133 for( int i = 0; i < Bloom::MAX_BLOOM_STEPS; ++i )
1134 {
1135 m_bloomDebugShader->SetParameter( BlueSharedString( "Downsample" + std::to_string( i + 1 ) ), downsample[i] );
1136 m_bloomDebugShader->SetParameter( BlueSharedString( "Upsample" + std::to_string( i + 1 ) ), upsample[i] );
1137 }
1138
1139 auto debugView = gpuResourcePool.GetTempTexture( "Bloom Debug", blitCurrent->GetWidth(), blitCurrent->GetHeight(), blitCurrent->GetFormat(), RENDER_TARGET );
1140
1141 DrawInto( debugView, Tr2LoadAction::DONT_CARE, m_bloomDebugShader, renderContext );
1142
1143 return debugView;
1144}
1145
1146void Tr2PostProcessRenderer::RenderGodRays( const Tr2TextureAL& dest, const Tr2TextureAL& depth, Tr2GpuResourcePool& gpuResourcePool, Tr2RenderContext& renderContext, Tr2PPGodRaysEffect* godrays )
1147{

Callers

nothing calls this directly

Calls 13

to_stringFunction · 0.85
DrawIntoFunction · 0.85
CreateInstanceMethod · 0.80
StartUpdateMethod · 0.80
SetEffectPathNameMethod · 0.80
SetOptionMethod · 0.80
GetTempTextureMethod · 0.80
EndUpdateMethod · 0.45
SetParameterMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected