Forum Discussion
saldavonschwart
9 years agoExplorer
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 ...
- 9 years agoHello!
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
saldavonschwart
9 years agoExplorer
rpalandri said:
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
Thanks a lot for the info. in the meantime I had to switch to another task (saving mp4 files even if on separate thread freezes the UE game thread and the gearVR IMU stays on, allowing you to see a frozen quad...). But I will try out your test as soon as I can, which will be in a couple days probably. Ill report back when I do.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago