aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/modules
diff options
context:
space:
mode:
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);
+}