From 707c8896cef6bff291f5d2f3339cf9bf46ee2242 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 14 Sep 2026 11:46:56 +0530 Subject: Refactor stuff --- src/main/resources/shaders/modules/utils.glsl | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/main/resources/shaders/modules/utils.glsl (limited to 'src/main/resources/shaders/modules/utils.glsl') 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); +} -- cgit v1.3.1