From b73e528aeb4d2054165b20cc5ed4d3bdcbde67a9 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 19 Aug 2019 01:13:48 +0200 Subject: [PATCH] Fixed mirroring --- samples/ComputeSharp.BokehBlur/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/ComputeSharp.BokehBlur/Program.cs b/samples/ComputeSharp.BokehBlur/Program.cs index 05ae8c0b..8b602848 100644 --- a/samples/ComputeSharp.BokehBlur/Program.cs +++ b/samples/ComputeSharp.BokehBlur/Program.cs @@ -19,7 +19,7 @@ namespace ComputeSharp.BokehBlur /// /// The radius of the bokeh blur effect to apply /// - private const int Radius = 32; + private const int Radius = 24; static void Main() { @@ -85,9 +85,9 @@ namespace ComputeSharp.BokehBlur int jx = j + x; if (iy < 0) iy = -iy; - else if (iy > height) iy -= height; + else if (iy > height) iy = 2 * height - iy; if (jx < 0) jx = -jx; - else if (jx > width) jx -= width; + else if (jx > width) jx = 2 * width - jx; int ki = Radius - y; int kj = Radius - x;