Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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

Discussion in 'Editor & General Support' started by wuhao1117, Jul 25, 2014.

  1. wuhao1117

    wuhao1117

    Joined:
    May 31, 2013
    Posts:
    6
    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: http://www.iryoku.com/smaa/

    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
     
  2. wuhao1117

    wuhao1117

    Joined:
    May 31, 2013
    Posts:
    6
  3. Kaspar-Daugaard

    Kaspar-Daugaard

    Unity Technologies

    Joined:
    Jan 3, 2011
    Posts:
    150
    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.
     
  4. wuhao1117

    wuhao1117

    Joined:
    May 31, 2013
    Posts:
    6
    Thank you Kaspar. That's the answer I want to hear :)

    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!
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723