1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-21 04:45:57 +08:00
Files
Godot-Shader-Lib/addons/ShaderLib/Maths/Vector/Distance/Chebyshev3D.gdshaderinc
2024-03-19 19:47:24 +05:30

4 lines
180 B
Plaintext

float chebyshev_distance_3d(vec3 point1, vec3 point2, float power) {
vec3 p = abs(point1 - point2);
return pow(pow(p.x, power) + pow(p.y, power) + pow(p.z, power), 1. / power);
}