summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/builtin_function.cpp')
-rw-r--r--src/glsl/builtin_function.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp
index d3484cbcd33..e6feb55759d 100644
--- a/src/glsl/builtin_function.cpp
+++ b/src/glsl/builtin_function.cpp
@@ -324,6 +324,8 @@ static const char *builtin_atan =
") \n"
" (assign (constant bool (1)) (var_ref r) (var_ref atan_retval) ) \n"
" (if (expression bool < (var_ref x) (constant float (0.000000)) ) (\n"
+ "\n"
+ "\n"
" (if (expression bool >= (var_ref y) (constant float (0.000000)) ) (\n"
" (declare ( ) float assignment_tmp)\n"
" (assign (constant bool (1)) (var_ref assignment_tmp) (expression float + (var_ref r) (constant float (3.141593)) ) ) \n"
@@ -341,12 +343,10 @@ static const char *builtin_atan =
"\n"
" )\n"
" (\n"
- " (if (expression bool >= (var_ref y) (constant float (0.000000)) ) (\n"
- " (assign (constant bool (1)) (var_ref r) (constant float (1.570796)) ) \n"
- " )\n"
- " (\n"
- " (assign (constant bool (1)) (var_ref r) (constant float (-1.570796)) ) \n"
- " ))\n"
+ "\n"
+ " (declare () float sgn)\n"
+ " (assign (constant bool (1)) (var_ref sgn) (expression float sign (var_ref y)))\n"
+ " (assign (constant bool (1)) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))\n"
"\n"
" ))\n"
"\n"