From 2fb6ab4f44ed2b4496b9df86842d0780ed882402 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 23 Aug 2022 17:27:32 +0200 Subject: [PATCH] Fix borders sampling in Depth Of Field to reduce leaking artifacts on screen edges --- Content/Shaders/DepthOfField.flax | 4 ++-- Source/Shaders/DepthOfField.shader | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content/Shaders/DepthOfField.flax b/Content/Shaders/DepthOfField.flax index 07ffb8e9d..bf2aa4db5 100644 --- a/Content/Shaders/DepthOfField.flax +++ b/Content/Shaders/DepthOfField.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5592dd558f25e897bc671a64f3f588e208fa6bb56bfd28661219f7b4df10c26e -size 16616 +oid sha256:c953fad9e4b9e2de475405d7a3f25387f9029f30a20dd969e957cc016a87a305 +size 13786 diff --git a/Source/Shaders/DepthOfField.shader b/Source/Shaders/DepthOfField.shader index 759ad4728..078b188b5 100644 --- a/Source/Shaders/DepthOfField.shader +++ b/Source/Shaders/DepthOfField.shader @@ -150,9 +150,9 @@ void CS_DepthOfField(uint3 groupID : SV_GroupID, uint3 groupThreadID : SV_GroupT // These positions are relative to the pixel coordinates #if HORIZONTAL - const uint2 samplePos = uint2(gridStart + grid, groupID.y); + const int2 samplePos = int2(gridStart + grid, groupID.y); #else - const uint2 samplePos = uint2(groupID.x, gridStart + grid); + const int2 samplePos = int2(groupID.x, gridStart + grid); #endif // Sample the textures