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
I just did a quick test. BTW, I am new to unreal. So I might need a bit of help here and there...
So first, I assume you meant for me to check the output log via adb. right? If so, yes, when the app starts on the device I get:
12-09 05:18:12.031 5369 5384 D UE4 : ------- EnterVRMode -------, tid = 5384
I just did a quick test. BTW, I am new to unreal. So I might need a bit of help here and there...
So first, I assume you meant for me to check the output log via adb. right? If so, yes, when the app starts on the device I get:
12-09 05:18:12.031 5369 5384 D UE4 : ------- EnterVRMode -------, tid = 5384
12-09 05:18:12.031 5369 5384 D UE4 : [2016.12.09-10.18.12:048][-8607492]LogHMD: Enabling r.MobileOnChipMSAA, previous value 0
12-09 05:18:12.031 5369 5384 D UE4 : [2016.12.09-10.18.12:048][-8607492]LogHMD: GearVR has started
But the rendering is completely aliased. So MSAA seems to somehow be off anyway.
Then I searched for the UE_LOG you mentioned. The one that prints the above. It is in GearVR.cpp (and does not seem to be conditionally compiled...).
Last, I also see the gl multisample fbo attachment at line 201 of OpenGLRenderTarget.cpp. But I don't know how I should check that this line is being hit, since it would run on the device and not the editor in my computer right? I tried sarting the editor from VS (developmentEditor configuration) and then hitting launch from the editor to upload to the device and run. But it didn't hit any breakpoints.
What else should I do?
But the rendering is completely aliased. So MSAA seems to somehow be off anyway.
Then I searched for the UE_LOG you mentioned. The one that prints the above. It is in GearVR.cpp (and does not seem to be conditionally compiled...).
Last, I also see the gl multisample fbo attachment at line 201 of OpenGLRenderTarget.cpp. But I don't know how I should check that this line is being hit, since it would run on the device and not the editor in my computer right? I tried sarting the editor from VS (developmentEditor configuration) and then hitting launch from the editor to upload to the device and run. But it didn't hit any breakpoints.
What else should 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