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 | f4ec01f09dbe4b731bee44e12d2c1f93268ca705 (patch) | |
| tree | 7ed1d824edb31ddcd45072920d4f9ee353844918 /src/main/resources/shaders/modules/utils.cs | |
| parent | 41246c0567f4c48ec5788a291386e377241e0eed (diff) | |
| download | art-playground-openrndr-f4ec01f09dbe4b731bee44e12d2c1f93268ca705.tar.gz art-playground-openrndr-f4ec01f09dbe4b731bee44e12d2c1f93268ca705.zip | |
Overdid the raymarch experiment
Diffstat (limited to 'src/main/resources/shaders/modules/utils.cs')
| -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); +} |
