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
The device is:
. Samsung Galaxy S6.
. Software and Baseband version: G920PVPS4CPJ1
. Hardware version: G920P.02
. Model number: SM-G920P
. Android version: 6.0.1
. Kernel version: 3.10.61-8847946
I'm also attaching logs (all, ue output only, vrapi output only).
I see that the UE log is the one that seems to list all device gl extensions. And I do see:
12-09 21:42:27.481 8399 8423 D UE4 : [2016.12.10-02.42.27:488][-8606092]LogRHI: GL_EXT_multisampled_render_to_texture
Interestingly too, I see that the gles version seems to be 3. I was expecting GLES2 since I do not have v3 checked in the project settings under platform android.
About putting logs in OpenGLRenderTarget.cpp, I guess I need the source code version of the engine right? And recompiling the engine itself?
I am currently running the 4.14.1 version from the Epic launcher.
I tried modifying the file, adding:
UE_LOG(LogTemp, Log, TEXT("------------------------ !!@# : MSAA | 1"));
at line 200. And a similar log for the else branch:
UE_LOG(LogTemp, Log, TEXT("------------------------ !!@# : NO MSAA | 1"));
and hitting compile in the editor but it did not print anything when running on the device.
Also, when I modified the cpp it warned me that it was under version control and had to be made read/write.
About sending you an image of the aliasing I am wondering how could I do this, since the aliasing becomes obvious only when putting on the headset and staring thru the lenses.
The device is:
. Samsung Galaxy S6.
. Software and Baseband version: G920PVPS4CPJ1
. Hardware version: G920P.02
. Model number: SM-G920P
. Android version: 6.0.1
. Kernel version: 3.10.61-8847946
I'm also attaching logs (all, ue output only, vrapi output only).
I see that the UE log is the one that seems to list all device gl extensions. And I do see:
12-09 21:42:27.481 8399 8423 D UE4 : [2016.12.10-02.42.27:488][-8606092]LogRHI: GL_EXT_multisampled_render_to_texture
Interestingly too, I see that the gles version seems to be 3. I was expecting GLES2 since I do not have v3 checked in the project settings under platform android.
About putting logs in OpenGLRenderTarget.cpp, I guess I need the source code version of the engine right? And recompiling the engine itself?
I am currently running the 4.14.1 version from the Epic launcher.
I tried modifying the file, adding:
UE_LOG(LogTemp, Log, TEXT("------------------------ !!@# : MSAA | 1"));
at line 200. And a similar log for the else branch:
UE_LOG(LogTemp, Log, TEXT("------------------------ !!@# : NO MSAA | 1"));
and hitting compile in the editor but it did not print anything when running on the device.
Also, when I modified the cpp it warned me that it was under version control and had to be made read/write.
About sending you an image of the aliasing I am wondering how could I do this, since the aliasing becomes obvious only when putting on the headset and staring thru the lenses.
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