Files
scummvm-cursorfix/engines/wintermute/base/gfx/opengl/shaders/wme_modelx.fragment
2026-02-02 04:50:13 +01:00

30 lines
474 B
Plaintext

in vec2 Texcoord;
in vec4 Color;
uniform sampler2D tex;
uniform float alphaRef;
uniform UBOOL alphaTest;
uniform UBOOL useTexture;
uniform UBOOL enableFog;
uniform vec4 fogColor;
varying float fogFactor;
OUTPUT
void main() {
outColor = Color;
if (useTexture) {
outColor = texture(tex, Texcoord) * outColor;
}
if (enableFog) {
outColor.rgb = mix(fogColor.rgb, outColor.rgb, fogFactor);
}
if (UBOOL_TEST(alphaTest) && outColor.a < alphaRef) {
discard;
}
}