1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-01-09 02:43:25 +08:00
Godot-Shader-Lib/addons/ShaderLib/Geometry/Geometry.gdshaderinc

11 lines
305 B
Plaintext
Raw Normal View History

vec3 node_scale_world(mat4 model_matrix){
2023-10-20 19:02:16 +05:30
vec3 _axis_x = model_matrix[0].xyz;
vec3 _axis_y = model_matrix[1].xyz;
vec3 _axis_z = model_matrix[2].xyz;
2023-10-20 19:02:16 +05:30
float _scale_x = length(_axis_x);
float _scale_y = length(_axis_y);
float _scale_z = length(_axis_z);
2023-10-20 19:02:16 +05:30
return vec3(_scale_x, _scale_y, _scale_z);
}