nokola
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Round corner looks not smooth

07 Apr 2017, 17:13

I have a better example. I made the grid's background transparent and added a 3D rotated cube to the scene below the Noesis surface.
Here's a second screenshot: https://1drv.ms/i/s!AspGCVZdWgTBuvMWL62tpixUUtGhWg

While the cube gets anti-aliased, the Noesis surface stays aliased. Maybe missing an option or Noesis bug?
Edit: opened bug http://bugs.noesisengine.com/view.php?id=1051
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: Round corner looks not smooth

07 Apr 2017, 18:17

Hi,

It seems that Unity 5.6 changed the rendering pipeline and things drawn after WaitForEndOfFrame yield instruction are not affected by multisampling. Maybe its related to this:
  • Graphics: Added HDR MSAA anti-aliasing support. HDR rendering and MSAA anti-aliasing now works as expected with forward shading.
I was able to render with multisample by checking the 'Enable Post Process' in Noesis View component, and adding the following line to Assets/NoesisGUI/Plugins/NoesisView.cs (otherwise UI will be vertically flipped):
    private void UpdateSettings()
    {
        ...
        
              if (_enablePostProcess && camera != null && (
#if UNITY_5_6_OR_NEWER
                    camera.actualRenderingPath == UnityEngine.RenderingPath.Forward ||
#endif
                    camera.actualRenderingPath == UnityEngine.RenderingPath.DeferredLighting ||
                    camera.actualRenderingPath == UnityEngine.RenderingPath.DeferredShading))
                {
        ...
    }
 
User avatar
ai_enabled
Posts: 231
Joined: 18 Jul 2013, 05:28
Contact:

Re: Round corner looks not smooth

07 Apr 2017, 18:21

I cannot try Unity 5.5 or NoesisGUI 2.0 right now (still using Unity 5.3).
I've created a new Unity project (3D), imported 1.2.6f3 NoesisGUI package, edited Lion xaml file with your sample code and run.
I had to switch camera to forward rendering. Then enable/disable MSAA setting in the QualitySettings. No other changes.
It works properly for me - see https://drive.google.com/open?id=0B4-tS ... WEtZm5wSWM
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
nokola
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Round corner looks not smooth

08 Apr 2017, 02:59

Thanks! The workaround pre-processing partially works - the image is anti-alised finally! The remaining issues which I worked around but would be nice if fixed:
1. The image still flips upside-down when we disable MSAA. At runtime on phone only we flip between MSAA and non-msaa often depending on whether you're looking at images that are rotated.
2. I expect there's an extra rendertexture/slowdown because Noesis has to render one more time for postprocessing - is this the case?

Ideally, things would just work by setting MSAA on Noesis, however for now the workaround is OK. Thanks again!
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: Round corner looks not smooth

11 Apr 2017, 16:31

1. We will try to detect automatically how to render the UI depending if the target is a texture or not, or if renderer is DirectX or OpenGL. Anyway we have to add a flag (like we had in 1.2 version) to Flip the render.

2. No slowdown. That flag indicates only when NoesisGUI drawing is done inside Unity render pipeline. If post-processing flag is enabled, then NoesisGUI can be affected by Unity post-processing. If not, then NoesisGUI renders the UI at the end of frame, so it is not affected by Unity post-processing (since Unity 5.6, it is not affected by multisampling either).
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Round corner looks not smooth

13 Apr 2017, 22:11

This is the change in Unity 5.6 regarding this MSAA issue:
Graphics: Removed MSAA from back buffer on most platforms. On iOS and Android, MSAA BB is still allowed. This is because these platforms have a large number of games with no Image Effects, and allowing MSAA BB helps to avoid extra blit. MSAA now requires a Render Texture. This is implicitly supported via the render stack mechanism. If you need MSAA, the target that is rendered to has MSAA enabled (as long as deferred rendering is not used in the stack).
We are considering the option of eliminating the Enable Post Process flag in Noesis view and let the user configure each case manually by using several unity cameras and deciding when the UI is rendered, after or before the image effects.
 
nokola
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Round corner looks not smooth

18 Apr 2017, 01:14

Thanks for the info! re: flag: as long as there's an easy way to specify when rendering happens that's probably good enough. Personally I have no preference since I don't use unity post-processing (using custom shaders.) Not sure how important is for others.
Also great to know that enabling the flag just changes the rendering order and doesn't create extra texture (my initial assumption.)
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Round corner looks not smooth

25 Apr 2017, 02:26

All this should be already fixed in the latest version (2.0.1).

Thanks a lot for the feedback provided!
 
nokola
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Round corner looks not smooth

26 Apr 2017, 07:32

let the user configure each case manually by using several unity cameras and deciding when the UI is rendered, after or before the image effects.
Possibly noob question: How do you decide when the UI is rendered? Also, is it possible to do it just with one camera? I just want to 1. render objects 2. render noesis with MSAA. There are no image effects.

Edit: nevermind - the default setup in 2.0.1 just exactly that :) Thanks!
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Round corner looks not smooth

28 Apr 2017, 22:22

You can decide the order or rendering by using the depth property of the camera. But effectively, as you discovered, you don't need that if you want to render before the effects.

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 84 guests