Closed septianrazi closed 9 months ago
Assigning @Cameron-Micka .
Thank you for reporting this @septianrazi. I think your hypothesis is correct:
May have something to do with Mesh Draw Call Batching as disabling Dynamic Batching in the Player settings for the project eliminates the issue
If a MRTK/Standard shader material is batched and uses a feature requiring object scale, then you will see artifacts like this.
To avoid this issue, we automatically enable GPU instancing on the material which also has the side effect of disabling batching:
My guess is Unity 2021.3.11f1 Unity no longer respects that flag and performs batching anyway.
But, there may be a better solution. As a test could you change this line in MixedRealityStandard.shader:
Tags{ "RenderType" = "Opaque" "LightMode" = "ForwardBase" "DisableBatching" = "False"}
And add this line to MixedRealityStandardShaderGUI.cs:
material.SetOverrideTag("DisableBatching", ScaleRequired() ? "True" : "False");
If this fixed the issue you are observing, then we can make this change in the toolkit. 😊
We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!
Describe the bug
Mixed Reality Toolkit/Standard Materials with Border Lights will have it's Border Light Width seemingly increase when multiple of the same Materials need to be rendered. If only one instance is rendered, material border width is displayed normally.
May have something to do with Mesh Draw Call Batching as disabling Dynamic Batching in the Player settings for the project eliminates the issue
To reproduce
Steps to reproduce the behavior:
Expected behavior
Material border width should say consistent even when multiple materials of the same instance need to be rendered with Dynamic Batching
Screenshots
This is what it looks like in an Oculus Quest 2 Android build:
These are the default Slates and Tooltips in MRTK Toolbox, yet border width is different compared to in Editor which would be the expected behaviour:
Your setup
Target platform
Additional context
Issue only occurred after upgrading from Unity 2020.3.30f1 to 2021.3.11f1