aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/modules/utils.glsl
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-09-18 12:46:58 +0530
committerAkshay Nair <phenax5@gmail.com>2026-09-18 12:46:58 +0530
commit8700f1b32f812104200e2c9041f35f501e0b67fa (patch)
treef270f36080485312bf4b2c4ee0feb0f5011c53d5 /src/main/resources/shaders/modules/utils.glsl
parenta329bfdbaa518f717ca40115edb21f07a8ad57cf (diff)
downloadart-playground-openrndr-8700f1b32f812104200e2c9041f35f501e0b67fa.tar.gz
art-playground-openrndr-8700f1b32f812104200e2c9041f35f501e0b67fa.zip
Faces stuff + simple camera rotation
Diffstat (limited to '')
-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);
+}
+