Fix borders sampling in Depth Of Field to reduce leaking artifacts on screen edges

This commit is contained in:
Wojtek Figat
2022-08-23 17:27:32 +02:00
parent 57cb15486e
commit 2fb6ab4f44
2 changed files with 4 additions and 4 deletions

BIN
Content/Shaders/DepthOfField.flax (Stored with Git LFS)

Binary file not shown.

View File

@@ -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