Skip to main content
Inspiring
June 18, 2013

AA vs downscaling from higher resolutions

I think it might be a good idea to re-open this discussion as there seems to be a fair amount of friction between those that find that downscaling from 1920x1080 is an acceptable way to improve image quality in the Rift vs those that find it unacceptable and comes with a potential increase in latency.

With Unity, I've explored a multitude of options:

1) No AA, using native Rift resolution of 1280x800.
2) No AA, downscaling from higher resolution.
3) Anti aliasing as a post effect, occurs after lens correction and chromatic aberration
4) AA between lens warp and chromatic aberration correction.
5) 2x/4x/8x MSAA via Unity's quality settings

Note that at this time, the #5 option here does not actually function like UDK's ScreenPercentage setting because the MSAA textures are not yet accessible. I'm guessing that when Unity does support this, the quality settings are all that we'll need to get a simple and effective "ScreenPercentage" setting in Unity.

Also note that at this time, the #4 option is not possible unless we make some significant changes to the Oculus Unity integration (and I personally haven't taken the time to try out a proof of concept).

So for the time being, that realistically leaves us with #1 (No AA at 1280x800), #2 (No AA, downscale from higher res), and #3 (AA using one of Unity's several AA image effects), and maybe even a combination of these.

Here are screenshots taken of some text that does not squarely face the user, although the user is looking directly at it. The text should read "0%":

1280x800 (No AA, 4xMSAA, postwarpAA):


1600x900 (No AA, 4xMSAA, postwarpAA):


1768x992 (No AA, 4xMSAA, postwarpAA):


1920x1080 (No AA, 4xMSAA, postwarpAA):


My conclusions:

1) I find that post-warp AA done as an image effect softens up the scene details too much, darkens it, etc. Not acceptable (and also has a not insignificant hit to frame rate).

2) I don't see much difference in legibility between no AA and using 4xMSAA in Unity's quality settings, so might as well not use it in favor of performance, although one could definitely make the argument that straight edges would benefit from it.

3) The higher the resolution the better, and even running at 1768x992 looks like it starts to provide acceptable readability of that "0%".

4) I don't have a way to test the latency difference between native 1280x800 and downscaling from a higher resolution, but it sure doesn't seem to feel any different to me, even with looking around all over the place real fast like a crazy person.

Therefore, until Unity allows access to MSAA textures, just use as high a resolution as you can? :)
    This topic has been closed for replies.

    83 replies

    Up and Coming
    November 10, 2013
    "Teddy0k" wrote:

    For what it's worth, it works on my machine (Radeon 7700 Series) and it looks great! Here's the Tuscany level I exported, can you test this cybereality and tell me if you get the same issues?
    https://drive.google.com/file/d/0B1KRnJKwYT-0WmZOU0hCWFdoSU0/edit?usp=sharing


    I tested this on my Nvidia GTX 760 with all settings on factory default. I got the same weird shadow issues clipping through the scene and following me around. I also had large vsync tear swimming in the middle of the screen when turning. Everything else looked good to me though.

    Here's a video of the odd shadow issue.


    Up and Coming
    November 10, 2013
    "boone188" wrote:
    I made a little demonstration of the basic supersampling: https://www.dropbox.com/s/cd9cked007dmnsd/BigBufferTuscany.zip

    - Left mouse click enabled/disables the supersampling
    - Press 1-5 to change scaling factor
    - Right mouse click to hide/show text


    Man that is an amazing difference!

    Is the chromatic aberration correction disabled in this demo? If so is it possible to re-enable it or is that a downside to this technique?
    Up and Coming
    November 10, 2013
    This is a really massive improvement, distant detail is heavily improved, however as drash said, there is a lot shimmering, especially on windows and also on the sea. It's similar to the lack of anisotropic filtering.

    I don't have any shadow issues like the video posted by tmek, mine is running flawlessly, but my GFX card is a Radeon R9 290X.
    Comunidad española de RV / Spanish VR Community
    Up and Coming
    November 10, 2013
    i think the main problem is theres a bug it seems if you use the deffered rendering or whatever the one with all the shadows it makes things look much worse. Unity just needs to fix that so that it doesnt make things look worse in that mode otherwise i think the engine looks pretty decent.
    Up and Coming
    November 10, 2013
    The real correct solution for shimmering is to have the distortion shader act as an image reconstruction filter. While doing the distortion, it should take multiple samples from the higher resolution buffer and filter them to get a single high quality output.

    Distortion has basically the same problem as texturing in general, where you are taking an image and either stretching or shrinking it non-uniformly as the slope of the surface changes with respect to the screen. The distortion shader is literally just rendering a textured sphere.

    So common techniques for texture filtering should produce pretty good results. You could try mip-mapping the high resolution buffer and then reading from it with anisotropic filtering. This way the samples will be distributed in a way that takes the curvature into account to maximize resolved detail. Probably not the fastest method given that the texture changes every frame, but the visual result should be about as good as it gets.
    Up and Coming
    November 11, 2013
    This is correct, by rendering the distortion at 1280x800 and using a bicubic texture filter, you get high quality without needing to upscale as much. I did a little testing on the distortion filter for the native rift resolution and calculated anything beyond 3x won't be visible with this mode (beyond the normal quality improvements supersampling gets you. I mean pixar use 256x supersampling!)

    Also remember going up to 3x is already rendering at 4k resolutions! While it may work great for Tuscanny, not many GPUs can run a bigger game at 60 fps at this resolution.

    Seeing how the Oculus Rift HD prototype is planning to render at 1080p (which is 1.5x for us), we should target this as a minimum for now.
    GunLock - Multiplayer FPS UE4 Rollercoaster HydraDeck - RTS
    Inspiring
    November 12, 2013
    Wow! This almost makes the Rift look HD. It's a big difference.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    November 12, 2013
    My framerate took a big hit with the super sampling demo, but that's understandable (store bought gaming laptop). The difference was amazing though. I'm definitely eyeing a gaming rig now to handle a 1080p or 1440p consumer Rift.
    Up and Coming
    November 12, 2013
    "cybereality" wrote:
    Wow! This almost makes the Rift look HD. It's a big difference.

    I can only imagine what it could do on an HD HMD. More improvements are coming down the pipeline.
    sh0v0r
    Up and Coming
    November 13, 2013
    I've yet to try this out with Lunar Flight but I noticed Unity 4.3 has some fixes in it for Render Targets.

    - Graphics: Fixed broken shadows with forward rendering to antialiased RenderTexture.

    Also this might be handy:

    - Added Camera.SetTargetBuffers for multiple render target (MRT) support.

    [edit 1]
    I'm upgrading to 4.3 today I'll try the Camera Scaler out in LF and see how it goes.

    [edit 2]
    Upgraded and everything seems to working fine including shadows. The only problem I ran into was the dual OVR Controller setup I use in my cockpit.

    I use separate controller layers so I can have lower nearclip inside the cockpit and the 2nd camera controller only renders the world.

    I assigned the CameraScaler to all of the cameras.

    Any ideas what might cause this?