[Unity] AntialiasingAsPost messes up UI
When I use the AntialiasingAsPostEffect script from the Unity Pro Standard Assets on my main camera (to which my Noesis GUIPanel is also attached), my scene renders with antialiasing but the UI on the GUIPanel looks incredibly noisy, and is upside-down. If I disable the AntialiasingAsPostEffect script, the UI looks fine.
Is this a known problem? And more importantly, is there a workaround for this, where my scene is antialiased but the UI on the GUIPanels is left alone?
Is this a known problem? And more importantly, is there a workaround for this, where my scene is antialiased but the UI on the GUIPanels is left alone?
Re: [Unity] AntialiasingAsPost messes up UI
Yeah, because of the render order in Unity, posteffects end up messing with the UI,
You can make a couple of tweaks to have Noesis render later
In NoesisGUIPanel.cs, change the OnPostRender() function to:
And then in comment out or remove this block (I recommend the former, to make it easier to merge with new versions)
You can make a couple of tweaks to have Noesis render later
In NoesisGUIPanel.cs, change the OnPostRender() function to:
Code: Select all
void OnPostRender()
{
if (_uiRenderer != null)
{
StartCoroutine(EndOfFrameRender());
}
}
IEnumerator EndOfFrameRender()
{
yield return new WaitForEndOfFrame();
_uiRenderer.PostRender();
}
Code: Select all
if (camera != null &&
camera.actualRenderingPath == UnityEngine.RenderingPath.DeferredLighting)
{
flags |= RendererFlags.FlipY;
}
Re: [Unity] AntialiasingAsPost messes up UI
Thank you very much, that worked like a charm!
-
- ai_enabled
- Posts: 231
- Joined:
- Contact:
Re: [Unity] AntialiasingAsPost messes up UI
Hello!
You can improve this script by making OnPostRender() method coroutine itself:
API reference: MonoBehaviour.OnPostRender().
You can improve this script by making OnPostRender() method coroutine itself:
Code: Select all
IEnumerator OnPostRender()
{
yield return new WaitForEndOfFrame();
if (_uiRenderer != null)
{
_uiRenderer.PostRender();
}
}
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
Re: [Unity] AntialiasingAsPost messes up UI
Patch officially incorporated in v1.1.11
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests