Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
saldavonschwart's avatar
9 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 ...
  • rpalandri's avatar
    9 years ago
    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