MixedReality-GraphicsTools-Unity icon indicating copy to clipboard operation
MixedReality-GraphicsTools-Unity copied to clipboard

Somotimes MRGT StandardShader can't rendering opaque render queue

Open HoloMoto opened this issue 2 years ago • 3 comments

Describe the bug

Sometimes the rendering gets messed up when I introduce MRGT to my Unity project and create a material that applies MRGT shaders

It's strange that this issue seems to be dependent on the local PC, as opening the same project on other PCs using platforms like GitHub sometimes works without any problems. Additionally, in my past experiences, this issue has seemingly resolved itself over time, which raises the possibility of it being a Unity bug.

However, all other shaders except MRGT StandardShader work correctly, so it seems there might be some compatibility or other form of relationship with the MRGT shader.

Even when building to a device, the rendering issue persists on the device side.

I've been aware of the existence of this bug for some time but couldn't reproduce it until now, so I wanted to share this information.

To reproduce

Steps to reproduce the behavior:

  1. Create New UnityProject
  2. Add MRGT package with use MixedRealityFeatureTools
  3. Create New MRGT Material

Expected behavior

Given the issues with reproducibility and the fact that this problem only occurs in local environments even with the same project, it does suggest a higher likelihood of being a Unity issue. However, it's indeed perplexing that MRGT shader is the only one not rendering. Incorporating workarounds and documenting this issue might be necessary.

Screenshots

image

image

Rendering doesn't occur for queues up to 2500 (AlphaTest+50). Rendering begins from 2501 onwards.

image

It renders in the TransparentObject state, but the rendering is incorrect in the OpaqueObject state.

I'm attaching a RenderDoc capture file related to this issue.

image

Your setup (please complete the following information)

  • Unity 2021.3.21f1 (UniversalRP)
  • Graphics Tools Version v0.6.2

Other Dependences is here

image

Target platform (please complete the following information)

  • HoloLens 2
  • UnityEditor (Windows 11 PC DirectX11)

Additional context

RenderDocs CaptureFile is here

MRGTStandardShaderOpaqueRenderingBuginUnity2021.3.21URP(que=2000) (1).zip

HoloMoto avatar Oct 13 '23 06:10 HoloMoto

This issue has, in fact, occurred a few times among people around me. However, it either resolved itself over time or, in my case, I couldn't reproduce it, and it remains unresolved.

The root cause of this issue is something that concerns me. Additionally, this issue appears to be project-specific, as it renders correctly in other projects on the same PC. It's truly bizarre. Typically, one can work around it by recreating the project, but in team development scenarios, it can be quite cumbersome, with the problem affecting only one team member."

HoloMoto avatar Oct 13 '23 06:10 HoloMoto

After creating the issue, I realized that my problem might be similar to this (#189 ). If it's indeed the same issue, could you please consider closing it?

HoloMoto avatar Oct 13 '23 06:10 HoloMoto

Thank you @HoloMoto for reporting! I have a hunch this is the same issue as #189. Looks like Unity introduced this feature in a breaking manner. If this turns out to be the same issue I will close this.

Cameron-Micka avatar Oct 16 '23 21:10 Cameron-Micka