From be9871ba926e63d393a412ae43484b147e6fcc73 Mon Sep 17 00:00:00 2001 From: hecomi Date: Sun, 20 Nov 2016 02:57:31 +0900 Subject: [PATCH] fix thickness bug. --- Assets/uDesktopDuplication/Shaders/uDD_Common.cginc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/uDesktopDuplication/Shaders/uDD_Common.cginc b/Assets/uDesktopDuplication/Shaders/uDD_Common.cginc index b198817..7bbb632 100644 --- a/Assets/uDesktopDuplication/Shaders/uDD_Common.cginc +++ b/Assets/uDesktopDuplication/Shaders/uDD_Common.cginc @@ -98,11 +98,11 @@ inline void uddBendVertex(inout float4 v, half radius, half width, half thicknes half angle = width * v.x / radius; #ifdef _FORWARD_Z v.z *= thickness; - radius -= v.z; + radius += v.z; v.z -= radius * (1 - cos(angle)); #elif _FORWARD_Y v.y *= thickness; - radius -= v.y; + radius += v.y; v.y += radius * (1 - cos(angle)); #endif v.x = radius * sin(angle) / width;