| 1113 | } |
| 1114 | |
| 1115 | void Tr2VolumetricsRenderer::RenderShadows( |
| 1116 | const EveComponentRegistry& registry, |
| 1117 | const Tr2TextureAL& shadowMap, |
| 1118 | Tr2RenderContext& renderContext ) |
| 1119 | { |
| 1120 | auto volumetricsCount = registry.ComponentCount<ITr2VolumetricRenderable>(); |
| 1121 | if( !shadowMap.IsValid() || !m_castShadows ) |
| 1122 | { |
| 1123 | return; |
| 1124 | } |
| 1125 | auto accumulator = m_batches.get(); |
| 1126 | |
| 1127 | registry.ProcessComponents<ITr2VolumetricRenderable>( [&accumulator]( ITr2VolumetricRenderable* volumetric ) { volumetric->GetVolumetricShadowBatches( accumulator ); } ); |
| 1128 | |
| 1129 | if( m_batches->GetBatchCount() ) |
| 1130 | { |
| 1131 | GPU_REGION( renderContext, "Volumetric Shadows" ); |
| 1132 | |
| 1133 | m_batches->Finalize(); |
| 1134 | |
| 1135 | renderContext.m_esm.PushRenderTarget( shadowMap ); |
| 1136 | renderContext.m_esm.PushDepthStencilBuffer( Tr2TextureAL() ); |
| 1137 | |
| 1138 | renderContext.m_esm.ApplyStandardStates( Tr2EffectStateManager::RM_ALPHA ); |
| 1139 | renderContext.RenderBatches( m_batches.get(), BlueSharedString( "Shadow" ) ); |
| 1140 | m_batches->Clear(); |
| 1141 | |
| 1142 | renderContext.m_esm.PopRenderTarget(); |
| 1143 | renderContext.m_esm.PopDepthStencilBuffer(); |
| 1144 | } |
| 1145 | } |
| 1146 | |
| 1147 | void Tr2VolumetricsRenderer::UpdateVariableStore() |
| 1148 | { |
nothing calls this directly
no test coverage detected