SDK Bug & Feature Requests

Please check out the following rules and use the provided template when posting a bug report! Off-topic posts will be deleted.http://bit.ly/vrchat-bug-reports
Revert Boolean "Value" Visibility in Avatar Expressions Menu Editor
With the SDK 3.10.2 update, the Avatar Expressions Menu editor received the following UX change: When targeting a Boolean parameter, the Value attribute is now hidden and is always treated as enabled, since that's the only valid option for a Boolean (true when activated, false when deactivated). While I understand the reasoning behind this change, it removed a useful workflow that was previously possible. Before this update, it was possible to create two menu controls targeting the same Boolean parameter: one with Value = True and another with Value = False. This allowed both controls to toggle the same parameter while only the control matching the current state would appear visually active. For example: Badge toggle (Value = True) Nameplate toggle (Value = False) When the Boolean is true, only the Badge toggle appears active. When it's false, only the Nameplate toggle appears active. This made it possible to represent two mutually exclusive states using a single Boolean while providing clear visual feedback in the Expressions Menu. Since the Value field is now hidden and always forced to true, this behavior is no longer possible. I'd like to see the Value option restored for Boolean parameters, even if it's tucked behind an advanced setting or warning. While the current behavior is simpler for most users, the previous implementation enabled legitimate use cases that are no longer possible.
1
·
Feature Request
·
tracked
[Optimization] Better implementation of Helpers.cginc : ApplyHue
The function ApplyHue in Packages/com.vrchat.base/Runtime/VRCSDK/Sample Assets/Shaders/Mobile/ToonStandard/CG/Helpers.cginc I felt could be rewritten, here are my findings if you so choose to use them. The original ApplyHue function compiles to this shader code: 0: sample r0.xyzw, v1.xyxx, t0.xyzw, s0 1: eq r0.w, cb0[2].x, l(0.000000) 2: if_z r0.w 3: sincos r1.x, r2.x, cb0[2].x 4: mul r1.yzw, r0.zzxy, l(0.000000, 0.577350, 0.577350, 0.577350) 5: mad r1.yzw, r0.zzxy, l(0.000000, 0.577350, 0.577350, 0.577350), -r1.wwyz 6: mul r1.xyz, r1.xxxx, r1.yzwy 7: mad r1.xyz, r0.xyzx, r2.xxxx, r1.xyzx 8: dp3 r0.w, l(0.577350, 0.577350, 0.577350, 0.000000), r0.xyzx 9: mul r0.w, r0.w, l(0.577350) 10: add r1.w, -r2.x, l(1.000000) 11: mad r1.xyz, r0.wwww, r1.wwww, r1.xyzx 12: add r1.xyz, -r0.xyzx, r1.xyzx 13: mad r0.xyz, v1.zzzz, r1.xyzx, r0.xyzx 14: endif 15: mov o0.xyz, r0.xyzx 16: mov o0.w, l(1.000000) 17: ret temp registers: r0.xyzw, r1.xyzw, r2.x mad x 4 mul x 3 add x 2 sincos x 1 dp3 x 1 None of these instructions are inherently expensive, in fact they're some of the cheapest outside of sincos, but I love bringing more ways to do things to the table. My first method is shorter in assembly and only uses the cosine part of sincos. // Rotates white-point to Z axis, rotates around Z, undo white-point rotation. half3 ApplyHue(half3 col, half hueAngle, half mask) { UNITY_BRANCH if (hueAngle == 0) { return col; } else { const half PI = 3.14159265359; const half3 OFFSETS = PI * half3(0.0/3.0, 2.0/3.0, 4.0/3.0); half3 ct = (1.0/3.0) + (2.0/3.0) * cos(hueAngle + OFFSETS); half3 shifted = (col.rgb * ct.x) + (col.gbr * ct.y) + (col.brg * ct.z); return lerp(col, shifted, mask); } } Which compiles to the following with the same usage 0: sample r0.xyzw, v1.xyxx, t0.xyzw, s0 1: eq r0.w, cb0[2].x, l(0.000000) 2: if_z r0.w 3: add r1.xyz, cb0[2].xxxx, l(0.000000, 2.094395, 4.188790, 0.000000) 4: sincos null, r1.xyz, r1.xyzx 5: mad r1.xyz, r1.xyzx, l(0.666667, 0.666667, 0.666667, 0.000000), l(0.333333, 0.333333, 0.333333, 0.000000) 6: mul r2.xyz, r0.yzxy, r1.yyyy 7: mad r1.xyw, r0.xyxz, r1.xxxx, r2.xyxz 8: mad r1.xyz, r0.zxyz, r1.zzzz, r1.xywx 9: add r1.xyz, -r0.xyzx, r1.xyzx 10: mad r0.xyz, v1.zzzz, r1.xyzx, r0.xyzx 11: endif 12: mov o0.xyz, r0.xyzx 13: mov o0.w, l(1.000000) 14: ret temp registers: r0.xyzw, r1.xyzw, r2.xyz mad x 4 add x 2 mul x 1 sincos x 1 This version uses slightly less instructions total, but parallelizes into three components used for r2, which might bump the temporary register count in some cases by one. This annoyed me, so I decided to make a slightly different version that's more in the middle while still using the same component count. // Rotates white-point to Z axis, rotates around Z, undo white-point rotation. half3 ApplyHue(half3 col, half hueAngle, half mask) { UNITY_BRANCH if (hueAngle == 0) { return col; } else { const half k = 0.57735026919; //1/sqrt(3) half ct = cos(hueAngle) * (1.0/3.0); half st = sin(hueAngle) * k; half a = -2.0/3.0 + ct + ct; half b = +1.0/3.0 - ct - st; half c = +1.0/3.0 - ct + st; half3 shifted = col.rgb*a + col.gbr*b + col.brg*c; return col.rgb + mask * shifted; } } Which still manages to strip the original down by a bit. 0: sample r0.xyzw, v1.xyxx, t0.xyzw, s0 1: eq r0.w, cb0[2].x, l(0.000000) 2: if_z r0.w 3: sincos r1.x, r2.x, cb0[2].x 4: mad r0.w, r2.x, l(0.666667), l(-0.666667) 5: mad r1.y, -r2.x, l(0.333333), l(0.333333) 6: mad r1.z, -r1.x, l(0.577350), r1.y 7: mad r1.x, r1.x, l(0.577350), r1.y 8: mul r1.yzw, r0.yyzx, r1.zzzz 9: mad r1.yzw, r0.xxyz, r0.wwww, r1.yyzw 10: mad r1.xyz, r0.zxyz, r1.xxxx, r1.yzwy 11: mad r0.xyz, v1.zzzz, r1.xyzx, r0.xyzx 12: endif 13: mov o0.xyz, r0.xyzx 14: mov o0.w, l(1.000000) 15: ret temp registers: r0.xyzw, r1.xyzw, r2.x mad x 7 sincos x 1 mul x 1 Optionally, if you wish to make the range of both of these, you can still simply multiply hueAngle by UNITY_TWO_PI , to resolve feedback like this one https://feedback.vrchat.com/sdk-bug-reports/p/mobile-toon-standard-hue-shift-should-go-from-0-to-1-not-628 I have also verified the shader compiler does unroll everything to become a single mov instruction if mask = 0. I have made supplemental demos in Desmos to showcase the methods: https://www.desmos.com/3d/w6lx6thiga https://www.desmos.com/calculator/qssso8prah I hereby grant legal rights to all shader code presented in this feature request. I present all of the above, granting full rights to use, reuse, modify, redistribute, and will not persue any form of legal action, following the guidelines of the MIT-0 No Attribution licence. blablabla open source, use it as you wish! ApplyHueMinimal.shader (which I have renamed to .txt for sending) has the MIT-0 licence as a header segment by the way.
1
·
Feature Request
Upgrade Harmony to 2.4
The Harmony package, used by Udon Sharp, and a handful of third-party community plugins for runtime patching in the editor, has been updated to officially support ARM64 on all platforms (Windows, Linux, and yes, Mac). This will correct any in-editor issues when running the Unity Editor on these platforms. Whilst VRChat itself may only support PC & Android, the Unity Editor is a cross-platform utility, and there are a variety of folks with ARM-equipped machines who use such hardware for primary development, and therefor experience issues with the editor without patching. With the advent of full iOS support on the horizon, this may further increase the # of Mac-based content creators. Please update the provided package. Release notes for version where ARM64 support was added Addendum An experimental VPM package can be found at MisutaaAsriel/VRCHarmony which installs a packaged release of Harmony 2.4.1. Unity appears to, in all testing, prefer the package's copy of Harmony over the version included by the VRC Base SDK. This package may also be installed using the following VPM repository: Dreemurrs-Repository VRChat may use the DLL provided from this repository if need be, or take over the package if they so wish. — It is currently built off of the Release target of Harmony, at the solution level, with .NET Framework 4.5.2 using GitHub Actions Note Building Lib.Harmony against the DebugFat target at the project level, or building it for Release against net452 at the solution level creates a successful drop in replacement. The release builds when built at the .NET project level or downloaded from the main Harmony repository currently output a mangled DLL that Unity Burst is incompatible with. A bug report is open on this here: pardeike/Harmony/issues/728 For further reference, the original copy of Harmony is built against .NET 4.5.0, which is no longer a valid target. 4.5.2 was chosen as its nearest replacement. Edited @ EPOCH 1757603286
2
·
Bug Report
·
tracked
Android build and test not working
Followed the this https://creators.vrchat.com/platforms/android/build-test-mobile/ but it fails to lunch vrchat on my phone after building it even puts the file on my phone so i know for sure adb is working and getting this in my editors console and tried this with 2 different world projects now AdbException: ADB failed with exit code 1. StdOut:Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.vrchat.mobile.playstore/com.vrchat.app.MainActivity (has extras) } StdError:Error type 3 Error: Activity class {com.vrchat.mobile.playstore/com.vrchat.app.MainActivity} does not exist. VRC.SDK3.Editor.Builder.ADB.Command (System.String[] arguments) (at <8c33ac67c14b4f31a7515261397206c6>:0) VRC.SDK3.Editor.Builder.ADB.StartVRChatIntoWorld (System.String remoteBundleFilePath, System.String appPackageName) (at <8c33ac67c14b4f31a7515261397206c6>:0) VRC.SDK3.Editor.Builder.VRCWorldAssetExporter.RunWorldTestAndroid (System.String bundleFilePath) (at <64d127784e7f4289a5a7ffbe49df807e>:0) VRC.SDK3.Editor.Builder.VRCWorldAssetExporter.RunScene (System.String bundleFilePath) (at <64d127784e7f4289a5a7ffbe49df807e>:0) Rethrow as WorldAssetExportException: An ADB command failed to execute. Check the console for more details. VRC.SDK3.Editor.VRCSdkControlPanelWorldBuilder.Build (System.Boolean runAfterBuild) (at ./Packages/com.vrchat.worlds/Editor/VRCSDK/SDK3/VRCSdkControlPanelWorldBuilder.cs:2576) VRC.SDK3.Editor.VRCSdkControlPanelWorldBuilder.BuildAndTest () (at ./Packages/com.vrchat.worlds/Editor/VRCSDK/SDK3/VRCSdkControlPanelWorldBuilder.cs:3282) VRC.SDK3.Editor.VRCSdkControlPanelWorldBuilder.OnBuildAndTestAction () (at ./Packages/com.vrchat.worlds/Editor/VRCSDK/SDK3/VRCSdkControlPanelWorldBuilder.cs:2147) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <27124aa0e30a41659b903b822b959bc7>:0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <cb81df0c49c643b1a04d9fc6ccca2433>:0) UnityEngine.UnitySynchronizationContext.Exec () (at <cb81df0c49c643b1a04d9fc6ccca2433>:0) UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <cb81df0c49c643b1a04d9fc6ccca2433>:0)
3
·
Bug Report
·
tracked
Load More