Forum Discussion
Zubz
9 years agoExplorer
basic anti aliasing
Hello,
Not sure if this is unity related or gear vr limitation, but drop a simple sphere and box (game object>3d object) side by side, now add the ovr camera rig to the scene and compile your .apk. You will see considerable amount of edge crawl and jitter on both the box as well as the sphere, and idea whats the best fix.
thnx
Not sure if this is unity related or gear vr limitation, but drop a simple sphere and box (game object>3d object) side by side, now add the ovr camera rig to the scene and compile your .apk. You will see considerable amount of edge crawl and jitter on both the box as well as the sphere, and idea whats the best fix.
thnx
11 Replies
Replies have been turned off for this discussion
- AnonymousTry this:
Edit > Project Settings > Quality > Anti Aliasing > 2x Multi Sampling
Or programmatically:
QualitySettings.antiAliasing = 2;
You can crank it up but you'll lose performance.
You can also also play with this setting to balance performance and quality:
UnityEngine.VR.VRSettings.renderScale = 1;
1 is the default (1024*1024 eye buffer), 1.40625 sets the eye buffer to slightly above native res (1440*1440) - ZubzExplorerAh! I didn't have the check mark green so i was building against a lower quality, thnx , all's well now.
- CodingJarProtege
"gconvergen" wrote:
You can also also play with this setting to balance performance and quality:
UnityEngine.VR.VRSettings.renderScale = 1;
Seems like you may know more about this than in the docs, so I thought I'd ask since the documentation seems to be a bit sparse on this topic: Is 2x multi-sampling going to be exactly the same as setting renderScale field to 2? What are the performance implications of each one, and are there better alternatives like not using multi-sampling and instead using the 1.4 value? I've read that 2x multi-sampling is basically free on S6 and this has made me curious why they exposed another value. - SvenVikingExpert ProtegeAs you mentioned, 2x multisampling is basically free -- on all supported Gear VR devices as far as I know. 4x is basically free on specific devices.
Increasing renderscale directly multiplies the rendered resolution, which improves visual quality far more than standard antialiasing, particularly since by default it's essentially upscaling from a lower resolution than the screen can handle. It's also ridiculously resource-intensive, though. Im not sure you could even manage to render a cube and sphere at 60fps with renderscale set to 2, but if so, you silent manage much else. 1.4 will probably more than double your render time. - CodingJarProtegeThank you for the detailed response. So the anti-aliasing Quality Setting sets Multi-Sampling Anti-Aliasing, whereas the RenderScale is essentially Super Sampling Anti-Aliasing. It sounds like, but I can't find verifcation that the Samsung handsets have hardware support for MSAA so it's "basically free" and should be enabled.
Thanks very much. I always have MSAA disabled on my desktop (for another project) which changes the Anti-Aliasing setting in Unity to SSAA which is why I was confused about the difference. I totally forgot MSAA existed and was different :). - SvenVikingExpert ProtegePretty sure Oculus said at Connect 2 that all GearVR handsets support at least 2x MSAA in hardware (some 4x). Apparently there's a way to check the hardware support in code, but I don't remember the details. There also used to be a bug that prevented you from changing the AA setting at runtime, but hopefully it might have been fixed by now.
- vrdavebOculus Staff4x MSAA is supported on all consumer Gear VR headsets that I know of. However it is somewhat more expensive than 2x MSAA which is cheap on Adreno and basically free on Mali. The number of samples increases linearly with MSAA level but quadratically with renderScale (which is, as you noted, SSAA). But even 8x MSAA is going to be cheaper than 2x renderScale. Changing MSAA level (or renderScale) at runtime should now work properly (tested with 5.3.3p1).
- CodingJarProtegeThanks Dave. This is all useful information.
- SvenVikingExpert ProtegeThanks, I didn't realise 2x was only basically free on Mali.
I also heard 4x MSAA was much cheaper on some hardware than others, and there was a way to distinguish between those hardware types in code (?) - vrdavebOculus StaffYou can use SystemInfo.graphicsDeviceName to check the GPU on Android. I'll ask around for more specific per-GPU performance recommendations. I typically use 2xMSAA unless the app is light on fillrate and texture bandwidth, in which case we can afford 4x.
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
- 4 years ago
- 5 years ago