Forum Discussion
saldavonschwart
10 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 ...
- 10 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
rpalandri
10 years agoExpert Protege
Hey!
Sorry you're running into issues with UE4.
So 1), we're seeing that "[2016.12.09-10.18.12:048][-8607492]LogHMD: Enabling r.MobileOnChipMSAA, previous value 0" is being called, so good! the value should be 1.
To check in which part of the code the engine goes in OpenGLRenderTarget.cpp, you could add a logging line, like : UE_LOG(LogTemp, Log, TEXT("Going through MSAA codepath")) in the multisample FBO case, and UE_LOG(LogTemp, Log, TEXT("Going through non-MSAA codepath")) in the other,so that we're sure which path we're going on.
One reason why it would switch off the MSAA codepath is if your driver/device doesn't support the MSAA extension (GLES doesn't support MSAA by default, it's a per-vendor extension that does). When VRAPI starts, it prints out all the supported extensions. Can you verify it contains GL_EXT_multisampled_render_to_texture? Can you also send us your exact model of device, and OS build version? A log of the execution of a UE4 program would also be helpful (containing the VRAPI start, vrmodes, everything :) )
Can you also send us a screenshot of your aliased scene? Although on-device MSAA is definitively helpful, it doesn't remove all the edges.
Thanks a lot
Sorry you're running into issues with UE4.
So 1), we're seeing that "[2016.12.09-10.18.12:048][-8607492]LogHMD: Enabling r.MobileOnChipMSAA, previous value 0" is being called, so good! the value should be 1.
To check in which part of the code the engine goes in OpenGLRenderTarget.cpp, you could add a logging line, like : UE_LOG(LogTemp, Log, TEXT("Going through MSAA codepath")) in the multisample FBO case, and UE_LOG(LogTemp, Log, TEXT("Going through non-MSAA codepath")) in the other,so that we're sure which path we're going on.
One reason why it would switch off the MSAA codepath is if your driver/device doesn't support the MSAA extension (GLES doesn't support MSAA by default, it's a per-vendor extension that does). When VRAPI starts, it prints out all the supported extensions. Can you verify it contains GL_EXT_multisampled_render_to_texture? Can you also send us your exact model of device, and OS build version? A log of the execution of a UE4 program would also be helpful (containing the VRAPI start, vrmodes, everything :) )
Can you also send us a screenshot of your aliased scene? Although on-device MSAA is definitively helpful, it doesn't remove all the edges.
Thanks a lot
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
- 4 years ago