| 69 | } |
| 70 | |
| 71 | void ContrastAdaptiveSharpeningPass::Render(const RenderContext& renderContext, GPUTexture* input, GPUTextureView* output) |
| 72 | { |
| 73 | ASSERT_LOW_LAYER(CanRender(renderContext)); |
| 74 | PROFILE_GPU_CPU("Contrast Adaptive Sharpening"); |
| 75 | auto device = GPUDevice::Instance; |
| 76 | auto context = device->GetMainContext(); |
| 77 | const AntiAliasingSettings& antiAliasing = renderContext.List->Settings.AntiAliasing; |
| 78 | |
| 79 | Data data; |
| 80 | data.InputSizeInv = Float2::One / input->Size(); |
| 81 | data.SharpeningAmount = antiAliasing.CAS_SharpeningAmount; |
| 82 | data.EdgeSharpening = antiAliasing.CAS_EdgeSharpening; |
| 83 | data.MinEdgeThreshold = antiAliasing.CAS_MinEdgeThreshold; |
| 84 | data.OverBlurLimit = antiAliasing.CAS_OverBlurLimit; |
| 85 | const auto cb = _shader->GetShader()->GetCB(0); |
| 86 | context->UpdateCB(cb, &data); |
| 87 | context->BindCB(0, cb); |
| 88 | context->BindSR(0, input); |
| 89 | context->SetState(_psCAS); |
| 90 | context->SetRenderTarget(output); |
| 91 | context->DrawFullscreenTriangle(); |
| 92 | } |
nothing calls this directly
no test coverage detected