aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/modules/utils.glsl
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-09-24 11:53:12 +0530
committerAkshay Nair <phenax5@gmail.com>2026-09-24 11:53:12 +0530
commitdc29499b23a90fac438cf74eb4865c15afecbdbd (patch)
tree4ef563c2611074ba58d59a54c4af231ec32512bb /src/main/resources/shaders/modules/utils.glsl
parent7bdd84e8ecade87ececdefe3cee614df8438e0a1 (diff)
downloadart-playground-openrndr-dc29499b23a90fac438cf74eb4865c15afecbdbd.tar.gz
art-playground-openrndr-dc29499b23a90fac438cf74eb4865c15afecbdbd.zip
Door thingy
Diffstat (limited to '')
-rw-r--r--src/main/resources/shaders/modules/utils.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/resources/shaders/modules/utils.glsl b/src/main/resources/shaders/modules/utils.glsl
index 6908f3b..3520df1 100644
--- a/src/main/resources/shaders/modules/utils.glsl
+++ b/src/main/resources/shaders/modules/utils.glsl
@@ -7,3 +7,9 @@ float ssubtract(float a, float b, float k) {
return -smin(-a, b, k);
}
+vec3 srgb(float r, float g, float b) {
+ return vec3(pow(r, 2.2), pow(g, 2.2), pow(b, 2.2));
+}
+vec3 srgb(vec3 c) {
+ return srgb(c.r, c.g, c.b);
+}