MRT supports antialiasing

In this example three.js examples , MSAA is not supported. It seems we don’t have a AA solution for mrt.

WebGLMultisampleRenderTarget is a way to handle AA in render target, the properties like .samples,.useRenderbuffer affect the render logic in WebGLRenderer, but it doesn’t work in mrt.

Is there a way to support AA for MRT?

There is a few ways of doing it as mentioned in this issue: Antialiasing and MultipleRenderTargets · Issue #333 · vanruesc/postprocessing · GitHub

It seems that MSAA + MRT is possible “Yes, you can. All MRT draw targets must having matching sample counts,
but it’s otherwise fine.”
https://www.khronos.org/webgl/public-mailing-list/public_webgl/1609/msg00084.php

So the most pertinent way to apply antialiasing on MRT would be to support MSAA in threejs. I’ve been trying to do it without success so far, my output textures are not getting rendered or something:

Also, this StackOverflow might help to understand the way of doing it:

If anyone expert enough on that matter could guide us the way it would be awesome! :smile:

Just to bump, I’ve implemented this from scratch here: WebGL Multi-sampled MRT FBOs - CodeSandbox

and updated the issue on supporting this in three with my findings and design concerns: Multisampling over Multiple Render Target · Issue #23300 · mrdoob/three.js · GitHub.

2 Likes

Solved and merged in r141

2 Likes