[1445] Certain shaders are not rendering properly
needs more information
Synergiance
Tested with Syn AckToon shader, with unity versions 2022.3.6f1 and 2022.3.22f1. Avatars uploaded with Unity version 2019 and below are unaffected.
Steps to reproduce:
- Upload an avatar using aforementioned shader
- Open VRChat
- Observe how avatar's shading looks nothing like it does in unity.
Log In
StormRel
needs more information
StormRel
Hello! Thanks for reporting this. Do you have an example avatar ID we can take a look at?
Synergiance
StormRel It appears my initial testing was flawed, and my first attempt to open this in Unity 2022.3.22f1 failed. This is a Unity bug with UsePass statements from what I can tell. I've not yet had time to test future Unity versions for this issue.
As for the nature of this issue, It appears limited to avatars uploaded with unity 2022.3.6f1 and newer with a UsePass statement, so UsePass must be treated differently in 2019.
Attached are as follows: The avatar with a shader using a UsePass statement, and the same avatar where the shader's UsePass statements have been replaced with the code from the pass they reference.
If anything I'd say that Unity version 2022.3.22f1 is fundamentally flawed, but the mitigation is now known, and I have not yet tested whether it affects future Unity versions.
An ID for the avatar in question, if this is still needed is:
avtr_560fb5b0-6996-423a-aaf3-e5c1200ce129
_
_tau_
Synergiance:
> my first attempt to open this in Unity 2022.3.22f1 failed
Do you mean you opened your avatar project in .22f1? That's not technically supported yet.
Although if there are issues to be looking out for, it is good to know about them ahead of time. I'm still slightly confused by your issue description though, to be honest - is there some issue in .22f1 that did not exist in .6f1 that is breaking content in client? Or only when uploaded?
Synergiance
_tau_
Yes, I opened the project in .22f1, in order to see if this was a unity bug or a vrchat bug.
I originally uploaded this avatar in .6f1, where it did not exhibit this issue in editor, yet exhibited the issue in the (at that time) beta version of vrchat, but not on the (at that time) live build of the game.
It was suggested to me to attempt opening the project in .22f1 to see if it was a unity issue. It was late that night and I was tired so I did not notice that my .6f1 editor was already open and simply got brought into the foreground. The next morning I recognized it and actually opened the project in .22f1, which is when I was able to confirm that it is in fact a unity bug with the .22f1 build of unity.
TLDR: The bug does not appear in the .6f1 editor, but appears in the current live build of vrchat, and did not appear prior to the update. It also appears in the .22f1 editor, which I needed to use to find a workaround for the issue.
I also determined that the bug appears in future versions of unity up to and including 6000.0.0b16, the current as of the time of writing this build of the Unity 6 beta. As such, my recommendation would probably be to advise other shader authors to test their shaders in .22f1 to ensure this issue does not affect them.
My mitigation for this issue was to replace any UsePass shader declarations with the code from the passes they reference.
As far as my testing goes, only avatars built with 2022.3.6f1 and 2022.3.22f1 will experience this issue in game. Avatars built in 2019.4.31f1 and prior are unaffected.
_
_tau_
Synergiance: We've managed to reproduce and potentially track down the issue for this!
To assist in a fix, would it be possible to share an affected shader? Ideally a minimal reproducer, but a full shader that shows these symptoms works too.