mirror of
https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git
synced 2025-09-19 20:05:57 +08:00
Maths nodes refactored, Smoothmin and Smoothmax nodes added
This commit is contained in:
4
addons/ShaderLib/Maths/Scalar/SmoothMax.gdshaderinc
Normal file
4
addons/ShaderLib/Maths/Scalar/SmoothMax.gdshaderinc
Normal file
@ -0,0 +1,4 @@
|
||||
float smoothmax(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);
|
||||
}
|
Reference in New Issue
Block a user