From 04b1f44396604b4038606b83014423e309bc215c Mon Sep 17 00:00:00 2001 From: Igor Shaposhnik Date: Mon, 1 Mar 2021 18:10:01 +0300 Subject: [PATCH] [glsl-out] Fix atan2 math function --- src/back/glsl/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/back/glsl/mod.rs b/src/back/glsl/mod.rs index e1b03ab2de..c5de5a1d8e 100644 --- a/src/back/glsl/mod.rs +++ b/src/back/glsl/mod.rs @@ -1599,7 +1599,9 @@ impl<'a, W: Write> Writer<'a, W> { Mf::Acos => "acos", Mf::Asin => "asin", Mf::Atan => "atan", - Mf::Atan2 => "atan2", + // glsl doesn't have atan2 function + // use two-argument variation of the atan function + Mf::Atan2 => "atan", // decomposition Mf::Ceil => "ceil", Mf::Floor => "floor",