Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
saldavonschwart's avatar
10 years ago
Solved

Is there a way to turn on anti aliasing MSAA for GearVR in Unreal Engine 4.14?

I'm working with Unreal 4.14 which supposedly even has a new forward rendering path for VR, though not sure if it is meant just for desktop vr or for mobile too.

I'm attempting to get antialiasing working on a Galaxy S6 with GearVR, but I've spent the past 2 days trying out all sorts of things and nothing makes a difference.

Basically, I start with a blank project set to mobile + scalable graphics quality. Then I've tried the following. Always packing to Android ETC2:

. default project settings (theoretically deferred path by default).
. With the new forward rendering option.
. Setting any combinations of the following console variables:
  . r.MSAACount
  . r.MSAACompositingSampleCount
  . r.DefaultFeature.Antialiasing
  . r.MobileOnChipMSAA
  . r.MobileMSAA
  . r.MobileContentScaleFactor
  . gearvr.EnableMSAA

Nothing seems to enable anti aliasing. I also posted this on SO, gamedev SE, Unreal AnwerHub and the Unreal forums. and no one has replied anything other than "MSAA should be on by default for GearVR."

Has anyone experienced this? Does anyone have any thoughts?

  • Hello!
    The forward rendering path for VR is really for PC only, the mobile side has always been forward only.

    By default, MSAA should be on when you start GearVR, but issues in the config files might have messed that up. How it works is, if gearvr.EnableMSAA is 1 when the plugin starts, then whatever the value of r.MobileOnChipMSAA is, it will be set as 1 (activated). r.MobileOnChipMSAA is the CVar that actually controls the rendertarget being set as an MSAA rendertarget, which activates the feature.

    How we can debug this:
    when gearvr.EnableMSAA is set, it will log :
    UE_LOG(LogHMD, Log, TEXT("Enabling r.MobileOnChipMSAA, previous value %d"), CVarMobileOnChipMSAA->GetInt());
    Can you see this "Enabling r.MobileOnChipMSAA, previous value..." log in your run? 

    If yes, and you still don't see MSAA, where the magic really happens is in OpenGLRenderTarget.cpp, line 201, where this is called:
    glFramebufferTexture2DMultisampleEXT
    instead of this
    FOpenGL::FramebufferTexture2D.
    Could you verify in which path your renderer goes?

    Thanks a lot

29 Replies

Replies have been turned off for this discussion