diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-09-14 11:46:56 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-09-14 11:46:56 +0530 |
| commit | ec344991e12cf52e52d6dbce961493248522e250 (patch) | |
| tree | a5884837f939d6fbdbef096505135e57e21d26fb /src/main/resources/shaders/modules/utils.glsl | |
| parent | 33c04916d264455abdb72a39bffb105ac3580627 (diff) | |
| download | art-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.glsl | 4 |
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); +} |
