Index: gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
index 65eca9ad36afcc8233508bcb22a70cae8970dcdb..671b2565ce31e0b6e932121154309e3ffbcfe25d 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
@@ -399,9 +399,7 @@ void ApplyFramebufferAttachmentCMAAINTELResourceManager::ApplyCMAAEffectTexture( |
} |
// - Combine RightBottom (.xy) edges from previous pass into |
- // RightBottomLeftTop (.xyzw) edges and output it into the mask (have to |
- // fill in the whole buffer including empty ones for the line length |
- // detection to work correctly). |
dshwang
2016/07/06 10:27:30
It's wrong, because all edge information is genera
|
+ // RightBottomLeftTop (.xyzw) edges and output it into the mask. |
// - On all pixels with any edge, input buffer into a temporary color buffer |
// needed for correct blending in the next pass (other pixels not needed |
// so not copied to avoid bandwidth use). |
@@ -415,13 +413,13 @@ void ApplyFramebufferAttachmentCMAAINTELResourceManager::ApplyCMAAEffectTexture( |
// gl_FragDepth mini4_edge_texture_ fbo.depth |
{ |
// Combine edges: each pixel will now contain info on all (top, right, |
- // bottom, left) edges; also create depth mask as above depth and mark |
- // potential Z sAND also copy source color data but only on edge pixels |
+ // bottom, left) edges; also mark depth 1 value on all pixels with any edge |
+ // and also copy source color data but only on edge pixels |
glUseProgram(edges_combine_shader_); |
- glUniform1f(0, 1.0f); |
+ glUniform1f(0, 0.0f); |
glUniform2f(1, 1.0f / width_, 1.0f / height_); |
glDepthMask(GL_TRUE); |
- glDepthFunc(GL_ALWAYS); |
+ glDepthFunc(GL_LESS); |
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); |
if (!is_gles31_compatible_) { |