diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-09-18 12:46:58 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-09-18 12:46:58 +0530 |
| commit | 8700f1b32f812104200e2c9041f35f501e0b67fa (patch) | |
| tree | f270f36080485312bf4b2c4ee0feb0f5011c53d5 /src/main/resources/shaders/modules/utils.glsl | |
| parent | a329bfdbaa518f717ca40115edb21f07a8ad57cf (diff) | |
| download | art-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.glsl | 5 |
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); +} + |
