diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-07-25 12:23:57 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 12:23:57 -0300 |
commit | 41a0ecb59b244ee01ece644107f02c64d2a5b64a (patch) | |
tree | 3ad9f1584a332042defdb0cf5f0b57152e5fa154 /servers | |
parent | 95d9302248edb3ddf6b08d23084ee928c41546c4 (diff) | |
parent | ca0a6c3fca1ee753050de474e4f6eb4ca71171a5 (diff) |
Merge pull request #20449 from Chaosus/matrix_conversion
Added conversions between matrixes in shaders
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/shader_language.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index fd1eb77143..146f0235a6 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -1376,6 +1376,15 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = { { "bvec4", TYPE_BVEC4, { TYPE_UVEC4, TYPE_VOID } }, { "bvec4", TYPE_BVEC4, { TYPE_VEC4, TYPE_VOID } }, + //conversion between matrixes + + { "mat2", TYPE_MAT2, { TYPE_MAT3, TYPE_VOID } }, + { "mat2", TYPE_MAT2, { TYPE_MAT4, TYPE_VOID } }, + { "mat3", TYPE_MAT3, { TYPE_MAT2, TYPE_VOID } }, + { "mat3", TYPE_MAT3, { TYPE_MAT4, TYPE_VOID } }, + { "mat4", TYPE_MAT4, { TYPE_MAT2, TYPE_VOID } }, + { "mat4", TYPE_MAT4, { TYPE_MAT3, TYPE_VOID } }, + //builtins - trigonometry { "radians", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, |