aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/modules/utils.glsl
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-09-14 11:46:56 +0530
committerAkshay Nair <phenax5@gmail.com>2026-09-14 11:46:56 +0530
commitec344991e12cf52e52d6dbce961493248522e250 (patch)
treea5884837f939d6fbdbef096505135e57e21d26fb /src/main/resources/shaders/modules/utils.glsl
parent33c04916d264455abdb72a39bffb105ac3580627 (diff)
downloadart-playground-openrndr-ec344991e12cf52e52d6dbce961493248522e250.tar.gz
art-playground-openrndr-ec344991e12cf52e52d6dbce961493248522e250.zip
Refactor stuff
Diffstat (limited to 'src/main/resources/shaders/modules/utils.glsl')
-rw-r--r--src/main/resources/shaders/modules/utils.glsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/resources/shaders/modules/utils.glsl b/src/main/resources/shaders/modules/utils.glsl
new file mode 100644
index 0000000..1616e8c
--- /dev/null
+++ b/src/main/resources/shaders/modules/utils.glsl
@@ -0,0 +1,4 @@
+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);
+}