From 1690d30621d268a047e3f364e945bc854f1df474 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 7 Apr 2020 18:34:15 +0100 Subject: [PATCH] Fix handling of w in Vec4 operators --- renderdoc/maths/vec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/maths/vec.h b/renderdoc/maths/vec.h index cdd36db81..2d849964c 100644 --- a/renderdoc/maths/vec.h +++ b/renderdoc/maths/vec.h @@ -111,17 +111,17 @@ inline Vec3f operator+=(Vec3f &a, const Vec3f &b) inline Vec4f operator*(const Vec4f &a, const float b) { - return Vec4f(a.x * b, a.y * b, a.z * b); + return Vec4f(a.x * b, a.y * b, a.z * b, a.w * b); } inline Vec4f operator+(const Vec4f &a, const Vec4f &b) { - return Vec4f(a.x + b.x, a.y + b.y, a.z + b.z); + return Vec4f(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w); } inline Vec4f operator-(const Vec4f &a) { - return Vec4f(-a.x, -a.y, -a.z); + return Vec4f(-a.x, -a.y, -a.z, -a.w); } inline Vec4f operator-(const Vec4f &a, const Vec4f &b)