2023-09-27 06:49:59 +00:00
|
|
|
uniform float contrast; /// set:1.5 tip:"bleach-to-gray < 1 > saturate"
|
|
|
|
uniform float brightness; /// set:0 max:2
|
2023-07-30 19:18:50 +00:00
|
|
|
|
|
|
|
void main() {
|
|
|
|
vec4 pixelColor = texture(iChannel0, TEXCOORD.st);
|
|
|
|
pixelColor.rgb /= pixelColor.a;
|
|
|
|
|
|
|
|
pixelColor.rgb = ((pixelColor.rgb - 0.5f) * max(contrast, 0)) + 0.5f;
|
|
|
|
|
|
|
|
pixelColor.rgb += brightness;
|
|
|
|
|
|
|
|
pixelColor.rgb *= pixelColor.a;
|
|
|
|
|
|
|
|
FRAGCOLOR = pixelColor;
|
|
|
|
}
|