Is it possible to get the subsample buffers used in MSAA from Unity?

Hello, this is my first post in Unity forum.

So I am trying to integrate SMAA s2x mode into Unity after I got the 1x mode working. If anyone is interested, this is the link to the original technique: SMAA: Enhanced Subpixel Morphological Antialiasing

This mode requires the two jittered subsample buffers of the scene (in the case of MSAA 2x), and will then perform SMAA 1x on each of the buffers and average the results. But it seems that Unity simply returns the blended result from MSAA, without giving access to the buffers used when rendering the scene with jittered matrices.

Rendering plugin might be able to solve the problem by rendering the entire scene from native code, with MSAA buffers created from c++ side. But that is simply too much trouble to render the whole scene again and it is not a good idea from a performance perspective.

So, my question is, is there a simpler way to access the subsample buffers used in MSAA in Unity?

I am using 4.3.4f1, btw.

Any help is appreciated, Thank you very much!

Hao

bump

Hi, you are right that we only give access to the blended result. It would make sense to have access to each sample, so we will see if that’s possible to add.

Thank you Kaspar. That’s the answer I want to hear :slight_smile:

It’s just such a shame that I cannot get SMAA 4x working in Unity without access to the subsample buffers. But I think I will live with SMAA T2X mode in our project for now. If Unity decides to add this feature, please let me know. Thanks!

This would be superb in Unity 5.

Source: Jorge Jimenez – SMAA T2x Source Code Released