d4rkc0d3r / d4rkAvatarOptimizer

d4rkpl4y3r's VRChat Avatar 3.0 optimizer
MIT License
368 stars 16 forks source link

poiyomi imcompability issues #109

Closed jerryzmtz closed 2 months ago

jerryzmtz commented 2 months ago

Can't find what is causing this.

SDK 3.5.2 poiyomi 9.1.2 d4rk optimizer 3.7.0

image

Error1: Error optimizing shader .poiyomi/Poiyomi Toon: Unknown function parameter declaration: 1 at d4rkpl4y3r.AvatarOptimizer.ShaderAnalyzer.ParseFunctionParametersWithPreprocessorStatements (System.Collections.Generic.List1[T] source, System.Int32& sourceLineIndex) [0x00150] in .\Packages\d4rkpl4y3r.d4rkavataroptimizer\Editor\ShaderAnalyzer.cs:958 at d4rkpl4y3r.AvatarOptimizer.ShaderOptimizer.DuplicateFunctionWithTextureParameter (System.Collections.Generic.List1[T] source, System.Int32& sourceLineIndex) [0x0008d] in .\Packages\d4rkpl4y3r.d4rkavataroptimizer\Editor\ShaderAnalyzer.cs:1882 at d4rkpl4y3r.AvatarOptimizer.ShaderOptimizer.ParseCodeLinesRecursive (System.Collections.Generic.List1[T] source, System.Int32& sourceLineIndex, System.String endSymbol) [0x001ee] in .\Packages\d4rkpl4y3r.d4rkavataroptimizer\Editor\ShaderAnalyzer.cs:2646 at d4rkpl4y3r.AvatarOptimizer.ShaderOptimizer.Run () [0x00838] in .\Packages\d4rkpl4y3r.d4rkavataroptimizer\Editor\ShaderAnalyzer.cs:2974 at d4rkpl4y3r.AvatarOptimizer.ShaderOptimizer.Run (d4rkpl4y3r.AvatarOptimizer.ParsedShader source, System.Collections.Generic.Dictionary2[TKey,TValue] staticPropertyValues, System.Int32 mergedMeshCount, System.Collections.Generic.List1[T] mergedMeshNames, System.Collections.Generic.HashSet1[T] defaultAnimatedProperties, System.Collections.Generic.List1[T] mergedMeshIndices, System.Collections.Generic.Dictionary2[TKey,TValue] arrayPropertyValues, System.Collections.Generic.Dictionary2[TKey,TValue] texturesToNullCheck, System.Collections.Generic.HashSet1[T] texturesToMerge, System.Collections.Generic.Dictionary2[TKey,TValue] animatedPropertyValues, System.Collections.Generic.List1[T] setKeywords, System.Collections.Generic.Dictionary2[TKey,TValue] poiUsedPropertyDefines) [0x001b3] in .\Packages\d4rkpl4y3r.d4rkavataroptimizer\Editor\ShaderAnalyzer.cs:1374 UnityEngine.Debug:LogError (object) d4rkpl4y3r.AvatarOptimizer.ShaderOptimizer:Run (d4rkpl4y3r.AvatarOptimizer.ParsedShader,System.Collections.Generic.Dictionary2<string, string>,int,System.Collections.Generic.List1<string>,System.Collections.Generic.HashSet1<System.ValueTuple2<string, bool>>,System.Collections.Generic.List1,System.Collections.Generic.Dictionary2<string, System.ValueTuple2<string, System.Collections.Generic.List1<string>>>,System.Collections.Generic.Dictionary2<string, string>,System.Collections.Generic.HashSet1<string>,System.Collections.Generic.Dictionary2<string, string>,System.Collections.Generic.List1<string>,System.Collections.Generic.Dictionary2<string, bool>) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/ShaderAnalyzer.cs:1378) d4rkAvatarOptimizer/<>c__DisplayClass238_0:b__4 (int) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:3384) System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Error2 ParserException: Unknown function parameter declaration: 1 d4rkpl4y3r.AvatarOptimizer.ShaderOptimizer.Run (d4rkpl4y3r.AvatarOptimizer.ParsedShader source, System.Collections.Generic.Dictionary2[TKey,TValue] staticPropertyValues, System.Int32 mergedMeshCount, System.Collections.Generic.List1[T] mergedMeshNames, System.Collections.Generic.HashSet1[T] defaultAnimatedProperties, System.Collections.Generic.List1[T] mergedMeshIndices, System.Collections.Generic.Dictionary2[TKey,TValue] arrayPropertyValues, System.Collections.Generic.Dictionary2[TKey,TValue] texturesToNullCheck, System.Collections.Generic.HashSet1[T] texturesToMerge, System.Collections.Generic.Dictionary2[TKey,TValue] animatedPropertyValues, System.Collections.Generic.List1[T] setKeywords, System.Collections.Generic.Dictionary2[TKey,TValue] poiUsedPropertyDefines) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/ShaderAnalyzer.cs:1379) d4rkAvatarOptimizer+<>cDisplayClass238_0.b4 (System.Int32 i) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:3384) System.Threading.Tasks.Parallel+<>cDisplayClass19_0`1[TLocal].b1 (System.Threading.Tasks.RangeWorker& currentWorker, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) (at <27124aa0e30a41659b903b822b959bc7>:0) --- End of stack trace from previous location where exception was thrown --- System.Threading.Tasks.Parallel+<>cDisplayClass19_01[TLocal].<ForWorker>b__1 (System.Threading.Tasks.RangeWorker& currentWorker, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Threading.Tasks.TaskReplicator+Replica1[TState].ExecuteAction (System.Boolean& yieldedBeforeCompletion) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Threading.Tasks.TaskReplicator+Replica.Execute () (at <27124aa0e30a41659b903b822b959bc7>:0) Rethrow as AggregateException: One or more errors occurred. (Unknown function parameter declaration: 1) System.Threading.Tasks.TaskReplicator.Run[TState] (System.Threading.Tasks.TaskReplicator+ReplicatableUserAction1[TState] action, System.Threading.Tasks.ParallelOptions options, System.Boolean stopOnFirstFailure) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Threading.Tasks.Parallel.ForWorker[TLocal] (System.Int32 fromInclusive, System.Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Func4[T1,T2,T3,TResult] bodyWithLocal, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <27124aa0e30a41659b903b822b959bc7>:0) --- End of stack trace from previous location where exception was thrown --- System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException (System.Collections.ICollection exceptions, System.Threading.CancellationToken cancelToken, System.Exception otherException) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Threading.Tasks.Parallel.ForWorker[TLocal] (System.Int32 fromInclusive, System.Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Func4[T1,T2,T3,TResult] bodyWithLocal, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Threading.Tasks.Parallel.For (System.Int32 fromInclusive, System.Int32 toExclusive, System.Action1[T] body) (at <27124aa0e30a41659b903b822b959bc7>:0) d4rkAvatarOptimizer.CreateOptimizedMaterials (System.Collections.Generic.List1[T] sources, System.Int32 meshToggleCount, System.String path, System.Collections.Generic.List1[T] originalMeshPaths, System.Collections.Generic.List`1[T] mergedMeshIndices) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:3380) d4rkAvatarOptimizer.CombineAndOptimizeMaterials () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:3986) d4rkAvatarOptimizer.Optimize () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:167) d4rkAvatarOptimizerEditor.OnInspectorGUI () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizerEditor.cs:163) UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.b0 () (at <80a8ce1980c648dca8e68f0d8aa3b930>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

TrashBin.zip

d4rkc0d3r commented 2 months ago

This is fixed with 3.7.2