Fixed using GL_SAMPLE_ALPHA_TO_COVERAGE
A few things were failing when trying to use
GL_SAMPLE_ALPHA_TO_COVERAGE:
- The alpha test should not be skipped when
GL_SAMPLE_ALPHA_TO_COVERAGE is set, otherwise
no computation is performed.
- The alpha reference value was wrong
(the alpha-to-coverage ramp is centered around it)
Change-Id: Ib9849868d267ca49fb3f0112192af8f207d34307
Reviewed-on: https://swiftshader-review.googlesource.com/8308
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/Renderer/PixelProcessor.hpp b/src/Renderer/PixelProcessor.hpp
index e5ab442..94d52d3 100644
--- a/src/Renderer/PixelProcessor.hpp
+++ b/src/Renderer/PixelProcessor.hpp
@@ -122,7 +122,7 @@
bool alphaTestActive() const
{
- return alphaCompareMode != ALPHA_ALWAYS;
+ return (alphaCompareMode != ALPHA_ALWAYS) || (transparencyAntialiasing != TRANSPARENCY_NONE);
}
bool pixelFogActive() const