From 41209eb9364ca9e4cbc3c47bcdff3deef8b83729 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 4 Dec 2013 19:55:09 +0100 Subject: [PATCH] Stencil-to-alpha fragment tweak: Set alpha to 0 if we can't deduce the stencil value. This fixes the weird glowing shadows in Wipeout. --- GPU/GLES/FragmentShaderGenerator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/FragmentShaderGenerator.cpp b/GPU/GLES/FragmentShaderGenerator.cpp index 8dab929671..e76adae817 100644 --- a/GPU/GLES/FragmentShaderGenerator.cpp +++ b/GPU/GLES/FragmentShaderGenerator.cpp @@ -453,7 +453,9 @@ void GenerateFragmentShader(char *buffer) { break; case STENCIL_VALUE_UNKNOWN: - // Do nothing. + // Maybe we should even mask away alpha using glColorMask and not change it at all? We do get here + // if the stencil mode is KEEP for example. + WRITE(p, " gl_FragColor.a = 0.0;\n"); break; } }