1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-01-08 10:23:24 +08:00

11 lines
294 B
Plaintext
Raw Permalink Normal View History

2024-08-06 16:23:43 +05:30
vec3 node_scale_world(mat4 model_matrix) {
vec3 axis_x = model_matrix[0].xyz;
vec3 axis_y = model_matrix[1].xyz;
vec3 axis_z = model_matrix[2].xyz;
2024-08-06 16:23:43 +05:30
float scale_x = length(axis_x);
float scale_y = length(axis_y);
float scale_z = length(axis_z);
2024-08-06 16:23:43 +05:30
return vec3(scale_x, scale_y, scale_z);
2023-10-20 19:02:16 +05:30
}