Closed fight4dream closed 3 years ago
Is there a SRP equivalent too?
I am afraid SRP is beyond my knowledge I can see there is a RenderPipelineManager.beginFrameRendering . but I don't know how it behaves against the canvas https://docs.unity3d.com/2019.1/Documentation/ScriptReference/Rendering.RenderPipelineManager.html
As we've started supporting the SRP moments now, we can't add additional moments that will break SRP otherwise it will just cause confusion. If anyone knows the answer then please post here. @reznovVR may be able to help perhaps?
Yeah it seems it would be possible to support both, built-in and SRP.
However the Application one says "Any work performed within this callback will increase the latency between sampling input and rendering to the device. It is important to keep the amount of work done in this callback to a minimum.". Isn't there typically several moment processors running?
@reznorVR can you confirm or deny the UI lag happens in SRP also?
Tbh even for a regular Update(), the same warning applies, or your framerate will be dropped
Steps to reproduce
Expected behavior
the canvas should follow the cube
Current behavior
the canvas lags behind the cube
Solution
add a moment to MomentProcessor which uses https://docs.unity3d.com/ScriptReference/Application-onBeforeRender.html if the cube and canvas are both updated positions in this moment, the canvas stays with cube
for additional info this moment is justified and may affect our users, i know steam vr plugin 2017+ also updated to use this moment https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Scripts/SteamVR_Behaviour.cs#179 https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Scripts/SteamVR_Render.cs#319