Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

MSAA seems broken for GearVR in 4.14

I'm trying to use the new forward rendering with MSAA in GearVR, on a Galaxy S6. But there's definitely no antialiasing going on. At all.

After a lot of time searching online and in the editor I found the following variables which potentially could be related to turning MSAA on:

1. Window > Developer Tools > Device Profiles > Android:

  • r.MSAACount

  • r.MSAACompositingSampleCount

  • r.DefaultFeature.Antialiasing

  • r.MobileOnChipMSAA

  • r.MobileMSAA

  • r.MobileContentScaleFactor

None of the above seem to make a difference if I change them from within the Device Profiles editor within UEd.

2. Edit > Project Settings > Engine > Rendering > Default Settings > Anti-Aliasing Method:. Setting it to MSAA does nothing.

3. I also tried setting all of the previous variables from within DefaultEngine.ini and nothing.

There's got to be something I am overlooking. If anyone has any thoughts I'd really appreciate it.

Product Version: UE 4.14
more ▼

asked Dec 07 '16 at 10:55 AM in Packaging & Deployment

avatar image

157 17 19 35

avatar image saldavonschwartz Dec 09 '16 at 06:44 AM

bump. :(

And btw, why did this get moved from bug reports? I had originally posted under question, but no one here ever replied and in the Unreal forums it was suggested to me that I move it to bug report here, since GearVR antialiasing should be on by default.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Pretty sad that these forums seem dead, since it would have been so easy for someone from Epic to just point me to where I need to look in the source. But oh well...

Turns out that:

  1. MSAA is enabled by default for mobile.

  2. The Forward renderer in 4.14 has nothing to do with mobile. It's new only for desktop (i.e. HTC Vive and Rift).

As to how to check that MSAA is indeed enabled:

You can check when running on the device in the logcat by searching for: LogHMD: Enabling r.MobileOnChipMSAA, previous value 0

You can also add a log (and recompile the engine) at OpenGLRenderTarget.cpp: line 201. You want to make sure you are hitting: glFramebufferTexture2DMultisampleEXT

Since the else branch in this codepath would otherwise create a non multisampled FBO.

The MSAA sample count however, appears to be hardcoded to 2 somewhere else in the engine source. After a long discussion in the Oculus forums I was told I could change the sample count (to have MSAA x4 for instance) at line 152:

 `// TODO: Mali supports 4x with similar hit as 2x, should we do something smarter here? Hard coded to 2 everywhere else
             const uint32 SampleCount = 2;

But this codepath is not being executed when running on the device. So not sure where else the 2 might be hardcoded.

more ▼

answered Dec 23 '16 at 03:15 PM

avatar image

157 17 19 35

avatar image mexic0la Apr 29 '17 at 08:46 PM

Hi there! Do I understand it correct and you managed to get the MSAA working?

I'm currently developing a cardboard app on a OP3T during my graduation project and got stuck on the same problem. I've read the few other discussions about this and tried over the past days much likely all variations of settings and approaches that I stumbled upon. It really drives me crazy because nothing seems to have any effect on the jagged edges. I'm more of an Artist-type and this troubleshooting is very frustrating, but switching the engine at the current point would be an immense setback.

I understand that cardboard is not the same as gearVR but, would you be so kind and tell me how you succeeded with the MSAA?

What are your final settings regarding forward-/deferred rendering; HDR on/off, Engine Version, etc.

And what about the stereo layeres mentioned in the other discussion on the occulus forum? I tried them and got the same result you described there.

Thank you!

avatar image mexic0la Apr 30 '17 at 11:04 AM

Okay after going through everything again I got finally a significant better Image!

My fault was, that I edited the settings only via the DeviceProfiles Manager and the DefaultEngine.ini, not in the DefaultDeviceProfiles.ini that you have to create first.

I had to check and correct the settings between the builds twice everytime to ensure that they get applied. Not very intuitive and can't be sure of my first testbuild-results.

I also tried some builds with the UE4.14.3 because in the newer version there is no r.MobileOnChipMSAA anymore, but with the same settings the app did not run on the device. This is probably a problem with the GoogleVR settings referable to Cardboard/Daydream settings. But as I created my project in the newest version anyway, I will not further investigate this path.

My final settings that worked on my device (OnePlus3T):


HDR=true r.DefaultFeature.AntiAliasing=3 r.MobileMSAA=2 r.MobileContentScaleFactor=1.5

Best result so far (I think 4xMSAA)

HDR=false r.DefaultFeature.AntiAliasing=3 r.MobileMSAA=4 r.MobileContentScaleFactor=2.0

I am not 100% sure if the ContentScaleFactor really made a difference, can't trust my eyes anymore, but the jagged edges on geometry are much better now! The UMG parts and materials look also a bit better but are still jagged and flickering, but that works as intended if I understood the rendering pipeline correct and has to be solved elsewhere.

Maybe that helps someone, it was really pain! x)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question