mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-08 05:51:09 +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;
|
|
}
|