Panorama180 Render : Notes by environment

Developer : ft-lab (Yutaka Yoshisaka).
06/13/2021 - 03/01/2022.

Back

Notes by environment

This is a memo about the differences between Unity versions and Built-in/URP/HDRP.
This is a supplement to "Operational verification".

Depth becomes darker in the display

If the depth of the demo scene "Editor/distanceDepthTest.unity" becomes dark when running in BuiltIn,
make sure "Player" - "Other Settings" - "Color Space" is set to "Linear" in the Project Settings.


The following is the display when "Color Space" is set to "Gamma".

The Depth displayed at the bottom is darkened.
The Depth texture uses the RenderTextureFormat.ARGBFloat format.
This will result in a texture that is not affected by sRGB when displayed on a display.

The following figure shows the display when "Color Space" is set to "Linear".

When running the Editor, it does not fit on the screen

When you run the demo scene in the Editor, if it extends far beyond the screen, it may be running as VR.

The demo scene for Panorama180 Render Editor does not support VR.
In this case, in the "XR Plug-in Management" section of the Project Settings,
turn off the "Initialize XR on Startup" checkbox and also turn off the "Plug-in Providers" checkbox.

Drawing using GUI.DrawTexture in OnGUI becomes white

GUI.DrawTexture was turning white when drawing OnGUI during Unity2018 BuiltIn/URP.
This only happens in the demo scene "Runtime/blocks" when the Color Space is "Linear" in Unity 2018.
This is not happening in Unity 2019/2020.
This problem is avoided by temporarily setting "GL.sRGBWrite = false;" when using GUI.DrawTexture in "Runtime/Sample_Capture.cs".
bool oldSRGBWrite = GL.sRGBWrite; if (rc.sRGB) GL.sRGBWrite = false; GUI.DrawTexture(new Rect(Screen.width - pWidth, 0, pWidth, pHeight), rc, ScaleMode.ScaleToFit, true); GL.sRGBWrite = oldSRGBWrite;

Crashes irregularly when building and running Unity2020 + HDRP with DX12

With HDRP + DX12, it was unstable when running after the build.
There was a crash due to unauthorized memory access.
This was happening not only when using Panorama180Render. It seemed to happen when using multiple RenderTexture.
When running in the Unity Editor, there is no problem.
In the case of HDRP + DX11, it was stable even during Runtime.

It ran stably on Unity 2021 + HDRP (DX12).

Heavy when switching between Panorama180/360 in HDRP

When switching between Panorama180/360 in Unity 2019.3 + HDRP,
it was getting heavy and I was getting frequent "Failed to create render texture primary RTV" errors.
https://issuetracker.unity3d.com/issues/hdrp-hdri-and-physically-based-sky-cause-memory-leaks-when-the-sun-is-updated-every-frame
The problem seems to occur when using "Physically Based sky" in Volume.
When I use HDRI Sky, this problem no longer occurs.

Incorrect color space conversion when building Oculus Quest2 natively with URP ?

Oculus Integration ver.29.0 was used.
When I build Oculus Quest2 natively with Unity 2020.3.6 + URP, the texture turns white when I assign the panorama texture as a material texture.
This occurred when the demo scene "Runtime/blocks_sync_RenderTexture" was built on Android for Oculus Quest2 and run on Oculus Quest2.

Also occurs when running natively on Oculus Quest2 with Unity 2019.4.28 + URP.
No problem running Runtime/PC-VR on PC with Unity 2020.3.6 + URP.
No problem when running natively on Oculus Quest2 with Unity 2020.3.6 + Built-in.
No problem when running natively on Oculus Quest2 with Unity 2019.4.16 + URP.
It seems to be caused by the Unity version. I have not found a solution.

Oculus Integration ver.35.0 + Unity 2021.2 (URP) did not have this problem and was stable.

Panorama180 Render may not be reflected when loading and running demo scene in Unity Editor

Depending on the version of Unity, the Panorama180 Render may not be reflected when the demo scene is loaded and run in the Unity Editor.
In this case, it seems to work well to show the MainCamera Inspector once and then play it again.

When building with Unity 2020.3 + URP and running it natively on Oculus Quest2, the whole thing flickers with noise

Oculus Integration ver.29.0 was used.
Not just with or without Panorama180 Render. Unity 2020.3.6 + URP with Android build and running natively on Oculus Quest2, there was a fine noise.
There also seems to be a slight delay in drawing.
No problem with Unity 2020.3.6 + Built-in.
No problem with Unity Unity 2019.4 + URP.

Native execution of Oculus Quest2 in Unity 2020.3 + URP does not appear to be stable.

Oculus Integration ver.35.0 + Unity 2021.2 (URP) did not have this problem and was stable.

Unity 2019.4.16 + URP does not get Depth texture correctly when running VR

Oculus Integration ver.29.0 was used.
When running VR in Unity 2019.4.16/2019.4.28 + URP, Depth cannot be obtained correctly if "Oculus"-"Stereo Rendering Mode" in "XR Plug-in Management" of Project Settings is not "Single Pass Instanced".
When using Oculus Quest (Android), Depth cannot be obtained correctly if "Oculus"-"Stereo Rendering Mode" in "XR Plug-in Management" of Project Settings is not "Multiview".

Unity 2019.4.16/2019.4.28 both have no problem running VR in Built-in.
This issue does not occur in Unity 2020.3.6 + URP.
Therefore, it seems to be a problem that occurs with certain Unity versions.

Compilation error in copyDepth_srp.shader

In the Built-In/URP environment, "copyDepth_srp.shader" causes a compilation error.
Since this Shader is not used outside of HDRP, there is no problem with the Panorama180 Render.

Back