diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-09-11 17:25:39 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-09-11 17:25:39 +0530 |
| commit | 4e6dbd91b5f33dcb8d3e739f173118801242b7e1 (patch) | |
| tree | 4bccd7889906b3cb039184229a63d52a22f22040 /src/main/resources/shaders/modules/utils.cs | |
| parent | 33f12612f9a34bc86faf314ef10e035a35d26cc9 (diff) | |
| download | art-playground-openrndr-4e6dbd91b5f33dcb8d3e739f173118801242b7e1.tar.gz art-playground-openrndr-4e6dbd91b5f33dcb8d3e739f173118801242b7e1.zip | |
Overdid the raymarch experiment
Diffstat (limited to '')
| -rw-r--r-- | src/main/resources/shaders/modules/utils.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/resources/shaders/modules/utils.cs b/src/main/resources/shaders/modules/utils.cs new file mode 100644 index 0000000..1616e8c --- /dev/null +++ b/src/main/resources/shaders/modules/utils.cs @@ -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); +} |
