From 7d905d9547c3f135578e442a5156f88bba41f096 Mon Sep 17 00:00:00 2001 From: Vladislav Kantaev Date: Sat, 10 Jun 2023 01:26:57 +0200 Subject: [PATCH] Suppress division by zero warning in Math.hlsl --- Packages/com.deltation.toon-rp/ShaderLibrary/Math.hlsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Packages/com.deltation.toon-rp/ShaderLibrary/Math.hlsl b/Packages/com.deltation.toon-rp/ShaderLibrary/Math.hlsl index bed1ec4a..0d4e7a4b 100644 --- a/Packages/com.deltation.toon-rp/ShaderLibrary/Math.hlsl +++ b/Packages/com.deltation.toon-rp/ShaderLibrary/Math.hlsl @@ -3,7 +3,9 @@ float InverseLerpUnclamped(const float a, const float b, const float v) { + #pragma warning (disable : 4008) // Suppress the division by zero warning return (v - a) / (b - a); + #pragma warning (restore : 4008) } float InverseLerpClamped(const float a, const float b, const float v)