1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-20 20:35:57 +08:00

NodeScaleWorld node refactored to Mesh node

This commit is contained in:
Digvijaysinh Gohil
2024-01-13 18:55:31 +05:30
parent 2828af7503
commit 4125d1d412
3 changed files with 16 additions and 8 deletions

View File

@ -0,0 +1,11 @@
vec3 geometry_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);
}