| 610 | } |
| 611 | |
| 612 | void PostFXContext::ComputeClosestMotion(const RenderAttributes& RenderAttribs) |
| 613 | { |
| 614 | auto& RenderTech = GetRenderTechnique(RENDER_TECH_COMPUTE_CLOSEST_MOTION, m_FeatureFlags, TEX_FORMAT_UNKNOWN); |
| 615 | if (!RenderTech.IsInitializedSRB()) |
| 616 | RenderTech.InitializeSRB(false); |
| 617 | |
| 618 | ScopedDebugGroup DebugGroup{RenderAttribs.pDeviceContext, "ComputeClosestMotion"}; |
| 619 | |
| 620 | ShaderResourceVariableX{RenderTech.SRB, SHADER_TYPE_PIXEL, "g_TextureDepth"}.Set(m_Resources[RESOURCE_IDENTIFIER_INPUT_CURR_DEPTH].GetTextureSRV()); |
| 621 | ShaderResourceVariableX{RenderTech.SRB, SHADER_TYPE_PIXEL, "g_TextureMotion"}.Set(m_Resources[RESOURCE_IDENTIFIER_INPUT_MOTION_VECTORS].GetTextureSRV()); |
| 622 | |
| 623 | ITextureView* pRTVs[] = { |
| 624 | m_Resources[RESOURCE_IDENTIFIER_CLOSEST_MOTION].GetTextureRTV(), |
| 625 | }; |
| 626 | |
| 627 | RenderAttribs.pDeviceContext->SetRenderTargets(_countof(pRTVs), pRTVs, nullptr, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); |
| 628 | RenderAttribs.pDeviceContext->SetPipelineState(RenderTech.PSO); |
| 629 | RenderAttribs.pDeviceContext->CommitShaderResources(RenderTech.SRB, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); |
| 630 | RenderAttribs.pDeviceContext->Draw({3, DRAW_FLAG_VERIFY_ALL, 1}); |
| 631 | RenderAttribs.pDeviceContext->SetRenderTargets(0, nullptr, nullptr, RESOURCE_STATE_TRANSITION_MODE_NONE); |
| 632 | } |
| 633 | |
| 634 | void PostFXContext::ComputePreviousDepth(const RenderAttributes& RenderAttribs) |
| 635 | { |
nothing calls this directly
no test coverage detected