v4k-git-backup/engine/art/shaders/fs_2_4_texel_inv_gamma.glsl

13 lines
271 B
Plaintext
Raw Normal View History

2023-08-10 22:46:04 +00:00
uniform sampler2D texture0; /*unit0*/
2023-08-10 21:53:51 +00:00
uniform float u_inv_gamma;
2023-09-10 14:46:07 +00:00
2023-08-10 21:53:51 +00:00
in vec2 uv;
out vec4 fragcolor;
2023-09-10 14:46:07 +00:00
2023-08-10 21:53:51 +00:00
void main() {
vec4 texel = texture( texture0, uv );
fragcolor = texel;
2023-08-10 22:46:04 +00:00
fragcolor.rgb = pow( fragcolor.rgb, vec3( u_inv_gamma ) ); // defaults: 1.0/2.2 gamma
2023-08-10 21:53:51 +00:00
}