1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-19 11:56:01 +08:00
Files
Godot-Shader-Lib/addons/ShaderLib/Geometry/Geometry.gdshaderinc
2024-08-06 16:23:43 +05:30

11 lines
294 B
Plaintext

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;
float scale_x = length(axis_x);
float scale_y = length(axis_y);
float scale_z = length(axis_z);
return vec3(scale_x, scale_y, scale_z);
}