mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
25 lines
383 B
Text
25 lines
383 B
Text
|
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;
|
||
|
}
|