| 1113 | } |
| 1114 | |
| 1115 | Tr2GpuResourcePool::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 | |
| 1146 | void Tr2PostProcessRenderer::RenderGodRays( const Tr2TextureAL& dest, const Tr2TextureAL& depth, Tr2GpuResourcePool& gpuResourcePool, Tr2RenderContext& renderContext, Tr2PPGodRaysEffect* godrays ) |
| 1147 | { |
nothing calls this directly
no test coverage detected