You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-30 16:26:50 +00:00
Merge pull request #20449 from Chaosus/matrix_conversion
Added conversions between matrixes in shaders
This commit is contained in:
@@ -1376,6 +1376,15 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
|
|||||||
{ "bvec4", TYPE_BVEC4, { TYPE_UVEC4, TYPE_VOID } },
|
{ "bvec4", TYPE_BVEC4, { TYPE_UVEC4, TYPE_VOID } },
|
||||||
{ "bvec4", TYPE_BVEC4, { TYPE_VEC4, 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
|
//builtins - trigonometry
|
||||||
|
|
||||||
{ "radians", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
|
{ "radians", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
|
||||||
|
|||||||
Reference in New Issue
Block a user