summaryrefslogtreecommitdiff
path: root/servers/visual/shader_language.cpp
diff options
context:
space:
mode:
authorRaXaR <the.raxar@gmail.com>2017-11-26 00:19:16 +0200
committerRaXaR <the.raxar@gmail.com>2017-11-27 01:18:45 +0200
commitb932d8c37aa416d68f6f63448abc77ad6815f80b (patch)
tree17629170b0f6bb6ab7184fac9957bd9ce3d06bb6 /servers/visual/shader_language.cpp
parent2f3c4c94dac8fc88db9a23fa07a070ed33951dc7 (diff)
Added overloads of vector parameters for shader Trig functions.
Ammend: Removed whitespace from blank lines. Ammend2: Removed extra spaces in an attempt to make Clang happy. :)
Diffstat (limited to 'servers/visual/shader_language.cpp')
-rw-r--r--servers/visual/shader_language.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 246a80280e..4de902af58 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -1352,15 +1352,54 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
//builtins - trigonometry
{ "sin", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "sin", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "sin", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "sin", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "cos", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "cos", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "cos", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "cos", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "tan", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "tan", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "tan", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "tan", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "asin", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "asin", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "asin", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "asin", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "acos", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "acos", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "acos", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "acos", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "atan", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "atan", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "atan", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "atan", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
{ "atan", TYPE_FLOAT, { TYPE_FLOAT, TYPE_FLOAT, TYPE_VOID } },
+ { "atan", TYPE_VEC2, { TYPE_VEC2, TYPE_VEC2, TYPE_VOID } },
+ { "atan", TYPE_VEC3, { TYPE_VEC3, TYPE_VEC3, TYPE_VOID } },
+ { "atan", TYPE_VEC4, { TYPE_VEC4, TYPE_VEC4, TYPE_VOID } },
+
{ "sinh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "sinh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "sinh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "sinh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "cosh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "cosh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "cosh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "cosh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "tanh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "tanh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "tanh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "tanh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
//builtins - exponential
{ "pow", TYPE_FLOAT, { TYPE_FLOAT, TYPE_FLOAT, TYPE_VOID } },
{ "pow", TYPE_VEC2, { TYPE_VEC2, TYPE_VEC2, TYPE_VOID } },