mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
24 lines
383 B
GLSL
24 lines
383 B
GLSL
uniform sampler2D tex;
|
|
uniform sampler2D texture2;
|
|
|
|
in vec4 vTexCoord;
|
|
|
|
void applyGamma(int channel)
|
|
{
|
|
vec4 color = texture(texture2, vec2(FragColor[channel], 0.0));
|
|
FragColor[channel] = color[channel];
|
|
}
|
|
|
|
void main()
|
|
{
|
|
FragColor = texture(tex, vTexCoord.st);
|
|
|
|
// /* DEBUG */ if (vTexCoord.x > 0.5)
|
|
{
|
|
applyGamma(0);
|
|
applyGamma(1);
|
|
applyGamma(2);
|
|
}
|
|
|
|
FragColor.a = 1.0;
|
|
}
|