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/Maths/Scalar/SmoothMin.gdshaderinc
2024-07-03 00:01:09 +05:30

4 lines
134 B
Plaintext

float smoothmin(float a, float b, float t) {
float h = clamp(.5 + .5 * (b - a) / t, 0, 1);
return mix(b, a, h) - t * h * (1. - h);
}