| 293 | } |
| 294 | |
| 295 | void Renderer::DrawSceneDepth(GPUContext* context, SceneRenderTask* task, GPUTexture* output, const Array<Actor*>& customActors) |
| 296 | { |
| 297 | CHECK(context && task && output && output->IsDepthStencil()); |
| 298 | |
| 299 | // Prepare |
| 300 | RenderContext renderContext(task); |
| 301 | renderContext.List = RenderList::GetFromPool(); |
| 302 | renderContext.View.Pass = DrawPass::Depth; |
| 303 | renderContext.View.Prepare(renderContext); |
| 304 | |
| 305 | // Call drawing (will collect draw calls) |
| 306 | DrawActors(renderContext, customActors); |
| 307 | |
| 308 | // Sort draw calls |
| 309 | renderContext.List->SortDrawCalls(renderContext, false, DrawCallsListType::Depth, DrawPass::Depth); |
| 310 | |
| 311 | // Execute draw calls |
| 312 | const float width = (float)output->Width(); |
| 313 | const float height = (float)output->Height(); |
| 314 | context->SetViewport(width, height); |
| 315 | context->SetRenderTarget(output->View(), static_cast<GPUTextureView*>(nullptr)); |
| 316 | renderContext.List->ExecuteDrawCalls(renderContext, DrawCallsListType::Depth); |
| 317 | |
| 318 | // Cleanup |
| 319 | RenderList::ReturnToPool(renderContext.List); |
| 320 | } |
| 321 | |
| 322 | void Renderer::DrawPostFxMaterial(GPUContext* context, const RenderContext& renderContext, MaterialBase* material, GPUTexture* output, GPUTextureView* input) |
| 323 | { |
no test coverage detected