cybereality
Cool, thanks for sharing. I cobbled something together myself, but the result is too bright and I don't know anything about the sRGB standard or GLSL to fix it.
So I'll gladly steal it if it's good 🙂
shader_type canvas_item;
uniform sampler2D albedo;
// source: https://www.shadertoy.com/view/4tXcWr
vec4 fromLinear(vec4 linearRGB)
{
bvec4 cutoff = lessThan(linearRGB, vec4(0.0031308));
vec4 higher = vec4(1.055)*pow(linearRGB, vec4(1.0/2.4)) - vec4(0.055);
vec4 lower = linearRGB * vec4(12.92);
return mix(higher, lower, cutoff);
}
void vertex() {}
void fragment()
{
COLOR = fromLinear(texture(albedo, UV));
}