View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003771 | NoesisGUI | Unity3D | public | 2024-11-02 12:57 | 2024-11-22 18:24 |
Reporter | SvenRH | Assigned To | jsantos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.2.5 | ||||
Target Version | 3.2.6 | Fixed in Version | 3.2.6 | ||
Summary | 0003771: Unity 6 / URP - RenderGraph Support | ||||
Description | The NoesisScriptableRenderPass doesn't support RenderGraph, so when trying to use Noesis the following Warning is emitted (and Noesis doesn't work) > The render pass NoesisView+NoesisScriptableRenderPass does not have an implementation of the RecordRenderGraph method. Please implement this method, or consider turning on Compatibility Mode (RenderGraph disabled) in the menu Edit > Project Settings > Graphics > URP. Otherwise the render pass will have no effect. Tried a quick ugly hack and added the following to the NoesisScritableRenderPass (made some stuff in the NoesisRenderer public so i could access it). It seems to work. There are some additonal things that are would be done in RenderOnScreen (FixCommandBuffers / Invalidate) that I skipped here as it wasn't necessary for my test case (DX12) private class PassData { public View view; public CommandBuffer commands; } public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { if (_view._uiView != null && _view._visible) { using (var builder = renderGraph.AddUnsafePass<PassData>("Just testing", out var passData)) { //bool flipY = !IsGL() && !IsBackbuffer(_view._camera); // var flipY = false; // _view._commands.name = Profiling.RenderOnScreen; passData.commands = _view._commands; passData.view = _view._uiView; builder.AllowPassCulling(false); builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { // var commands = passData.commands; var eventId = 0x6449; var invalidate = true; context.cmd.IssuePluginEventAndData(NoesisRenderer._renderOnscreenCallback, eventId, passData.view.Renderer.CPtr.Handle); }); } } } | ||||
Steps To Reproduce | Add Noesis to a Unity 6 URP project, press play. | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Thanks for the time creating this ticket and proposing a workaround. We will work on this as soon as possible. |
|
Got a bit nicer workaround now. In NoesisScriptableRenderPass private class PassData { public View view; public bool clearStencil; } public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { if (_view._uiView != null && _view._visible) { using (var builder = renderGraph.AddUnsafePass<PassData>("Noesis", out var passData)) { passData.view = _view._uiView; passData.clearStencil = _view._clearStencil; builder.AllowPassCulling(false); builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { bool flipY = !IsGL(); // && !IsBackbuffer(_view._camera); NoesisRenderer.RenderOnscreen(passData.view, flipY, context.cmd, true, passData.clearStencil); }); } } } and in NoesisRenderer public static void RenderOnscreen(Noesis.View view, bool flipY, UnityEngine.Rendering.UnsafeCommandBuffer commands, bool invalidate, bool clearStencil) { FixCommandBuffer(commands); if (clearStencil) { commands.ClearRenderTarget(UnityEngine.Rendering.RTClearFlags.Stencil, UnityEngine.Color.black, 1.0f, 0); } var eventId = flipY ? EventId.RenderOnscreenFlipY : EventId.RenderOnscreen; commands.IssuePluginEventAndData(_renderOnscreenCallback, (int)eventId, view.Renderer.CPtr.Handle); if (invalidate) InvalidateState(commands); } and FixCommandBuffer & InvalidateState are just copies of the 'normal' versions, but with UnityEngine.Rendering.UnsafeCommandBuffer as a parameter. |
|
Thanks for the great feedback! | |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-11-02 12:57 | SvenRH | New Issue | |
2024-11-04 16:47 | jsantos | Assigned To | => jsantos |
2024-11-04 16:47 | jsantos | Status | new => assigned |
2024-11-04 16:47 | jsantos | Target Version | => 3.2.6 |
2024-11-04 16:48 | jsantos | Note Added: 0010103 | |
2024-11-04 16:48 | jsantos | Note Edited: 0010103 | |
2024-11-04 17:06 | SvenRH | Note Added: 0010104 | |
2024-11-22 18:17 | jsantos | Status | assigned => resolved |
2024-11-22 18:17 | jsantos | Resolution | open => fixed |
2024-11-22 18:17 | jsantos | Fixed in Version | => 3.2.6 |
2024-11-22 18:24 | jsantos | Note Added: 0010152 |