aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/modules/utils.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/shaders/modules/utils.glsl')
-rw-r--r--src/main/resources/shaders/modules/utils.glsl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/resources/shaders/modules/utils.glsl b/src/main/resources/shaders/modules/utils.glsl
index 1616e8c..6908f3b 100644
--- a/src/main/resources/shaders/modules/utils.glsl
+++ b/src/main/resources/shaders/modules/utils.glsl
@@ -2,3 +2,8 @@ float smin(float a, float b, float k) {
float h = clamp(0.5 + 0.5 * (b - a) / k, 0.0, 1.0);
return mix(b, a, h) - k * h * (1.0 - h);
}
+
+float ssubtract(float a, float b, float k) {
+ return -smin(-a, b, k);
+}
+