Artifacts when 4x MSAA anti-aliasing is enabled on iPad / iOS

I enabled 4x MSAA on my iPad OpenGL ES 2.0 using the example on the Apple website. On the simulator, this works well, and the image is beautiful and smooth, however, the device has colored artifacts at the edges where it should be smoothed. This exists on the iPad / iPad2 and iPhone4, but not in the simulator. I have attached an image below what the artifact looks like. Does anyone know what this could be?

Example

+6
source share
1 answer

It is very similar to your shader, but you did not publish a shader, so I can’t be sure. See, When you enable MSAA, it becomes possible for the shader to be executed for samples that are inside the pixel area, but outside the triangle area. Without an MSAA, this pixel would not have caused a fragment shader to execute at all, but now that you have MSAA enabled, it should execute a fragment shader for that pixel if one of the samples is active.

The link I posted explains the problem in more detail. It also gives you ways to avoid this problem, but I don't know if OpenGL ES 2.0 provides central debugging access. If this is not the case, you will have to disable multisampled rendering for those things that cause artifacts with glDisable(GL_MULTISAMPLE) . You can re-enable it if you need active multisampling.

+9
source

Source: https://habr.com/ru/post/891412/


All Articles