scripts
This commit is contained in:
@@ -0,0 +1,264 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C8E RID: 3214
|
||||
[Token(Token = "0x2000C8E")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0)]
|
||||
public struct AppendComponentsJob : IJobParallelFor
|
||||
{
|
||||
// Token: 0x06004D5F RID: 19807 RVA: 0x001205DC File Offset: 0x0011E7DC
|
||||
[Token(Token = "0x6004D5F")]
|
||||
[Address(RVA = "0x23E770", Offset = "0x23DB70", VA = "0x18023E770")]
|
||||
public AppendComponentsJob(NativeClusterMesh srcMesh, NativeClusterMesh destMesh, NativeList<PrimitiveComponentInfo> components, MeshOptimizationData optimData, bool cullEncapsulated, float rootScale, bool useMaterials)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D60 RID: 19808 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D60")]
|
||||
[Address(RVA = "0x23E640", Offset = "0x23DA40", VA = "0x18023E640", Slot = "4")]
|
||||
public void Execute(int componentIdx)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D61 RID: 19809 RVA: 0x001205EC File Offset: 0x0011E7EC
|
||||
[Token(Token = "0x6004D61")]
|
||||
[Address(RVA = "0x23E650", Offset = "0x23DA50", VA = "0x18023E650")]
|
||||
private float2 GenerateUV(float3 scaleOS, float3 normalOS, float3 posOS)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004D61)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling Unity.Mathematics.float2 ClusterLOD.AppendComponentsJob::GenerateUV(Unity.Mathematics.float3,Unity.Mathematics.float3,Unity.Mathematics.float3)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:float32(var_0_06, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](posOS)))
|
||||
stloc:float32(var_1_0D, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](normalOS)))
|
||||
stloc:float32(var_2_14, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](scaleOS)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06004D62 RID: 19810 RVA: 0x00120610 File Offset: 0x0011E810
|
||||
[Token(Token = "0x6004D62")]
|
||||
[Address(RVA = "0x23E4B0", Offset = "0x23D8B0", VA = "0x18023E4B0")]
|
||||
private float DistanceToShapeEdge(float3 pos, PrimitiveComponentInfo info, AppendComponentsJob.EncapsulateMode mode)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004D62)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single ClusterLOD.AppendComponentsJob::DistanceToShapeEdge(Unity.Mathematics.float3,ClusterLOD.PrimitiveComponentInfo,ClusterLOD.AppendComponentsJob/EncapsulateMode)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:int32(var_0_06, ldfld:int32(PrimitiveComponentInfo::scalingMode, ldloc:PrimitiveComponentInfo[exp:valuetype ClusterLOD.PrimitiveComponentInfo&](info)))
|
||||
stloc:float32(var_1_0D, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](pos)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06004D63 RID: 19811 RVA: 0x0012062C File Offset: 0x0011E82C
|
||||
[Token(Token = "0x6004D63")]
|
||||
[Address(RVA = "0x23E6C0", Offset = "0x23DAC0", VA = "0x18023E6C0")]
|
||||
private AppendComponentsJob.EncapsulateMode GetEncapsulateMode(PrimitiveComponentInfo info)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004D63)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling ClusterLOD.AppendComponentsJob/EncapsulateMode ClusterLOD.AppendComponentsJob::GetEncapsulateMode(ClusterLOD.PrimitiveComponentInfo)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:float32(var_0_06, ldfld:float32(PrimitiveComponentInfo::authoredBevelRatio, ldloc:PrimitiveComponentInfo[exp:valuetype ClusterLOD.PrimitiveComponentInfo&](info)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06004D64 RID: 19812 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D64")]
|
||||
[Address(RVA = "0x23E4A0", Offset = "0x23D8A0", VA = "0x18023E4A0")]
|
||||
private void ClipEncapsulatedTriangles(int primitiveIdx, int startIndex, int indexCount)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D65 RID: 19813 RVA: 0x00120640 File Offset: 0x0011E840
|
||||
[Token(Token = "0x6004D65")]
|
||||
[Address(RVA = "0x23E590", Offset = "0x23D990", VA = "0x18023E590")]
|
||||
private void ExecuteScaledVerts(int componentIdx, int destStartVertex, float4x4 mat, float4x4 matInvTranspose, float3 localSpaceWorldScale)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04003959 RID: 14681
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4003959")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> srcVerts;
|
||||
|
||||
// Token: 0x0400395A RID: 14682
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400395A")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float3> srcNormals;
|
||||
|
||||
// Token: 0x0400395B RID: 14683
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400395B")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float4> srcTangents;
|
||||
|
||||
// Token: 0x0400395C RID: 14684
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400395C")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float2> srcUVs;
|
||||
|
||||
// Token: 0x0400395D RID: 14685
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400395D")]
|
||||
[ReadOnly]
|
||||
private NativeList<int> srcIndices;
|
||||
|
||||
// Token: 0x0400395E RID: 14686
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400395E")]
|
||||
[ReadOnly]
|
||||
private NativeList<MeshComponentInfo> srcComponentInfo;
|
||||
|
||||
// Token: 0x0400395F RID: 14687
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400395F")]
|
||||
[ReadOnly]
|
||||
private NativeList<PrimitiveComponentInfo> srcComponents;
|
||||
|
||||
// Token: 0x04003960 RID: 14688
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4003960")]
|
||||
[ReadOnly]
|
||||
private bool cullEncapsulated;
|
||||
|
||||
// Token: 0x04003961 RID: 14689
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x74")]
|
||||
[Token(Token = "0x4003961")]
|
||||
[ReadOnly]
|
||||
private float rootScale;
|
||||
|
||||
// Token: 0x04003962 RID: 14690
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x4003962")]
|
||||
[ReadOnly]
|
||||
private bool useMaterials;
|
||||
|
||||
// Token: 0x04003963 RID: 14691
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x4003963")]
|
||||
[WriteOnly]
|
||||
private NativeArray<MeshComponentInfo> destComponentInfo;
|
||||
|
||||
// Token: 0x04003964 RID: 14692
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x4003964")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float3> destVerts;
|
||||
|
||||
// Token: 0x04003965 RID: 14693
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x4003965")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float3> destNormals;
|
||||
|
||||
// Token: 0x04003966 RID: 14694
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x4003966")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float4> destTangents;
|
||||
|
||||
// Token: 0x04003967 RID: 14695
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC0")]
|
||||
[Token(Token = "0x4003967")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float4> destMaterialIndices;
|
||||
|
||||
// Token: 0x04003968 RID: 14696
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xD0")]
|
||||
[Token(Token = "0x4003968")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float2> destUVs;
|
||||
|
||||
// Token: 0x04003969 RID: 14697
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xE0")]
|
||||
[Token(Token = "0x4003969")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> destIndices;
|
||||
|
||||
// Token: 0x0400396A RID: 14698
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xF0")]
|
||||
[Token(Token = "0x400396A")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> triangleRemoved;
|
||||
|
||||
// Token: 0x0400396B RID: 14699
|
||||
[Token(Token = "0x400396B")]
|
||||
public const int SCALING_ENABLED = 1;
|
||||
|
||||
// Token: 0x0400396C RID: 14700
|
||||
[Token(Token = "0x400396C")]
|
||||
public const int PYRAMID_SCALING_MODE = 2;
|
||||
|
||||
// Token: 0x0400396D RID: 14701
|
||||
[Token(Token = "0x400396D")]
|
||||
public const int LOD_SCALE = 3;
|
||||
|
||||
// Token: 0x02000C8F RID: 3215
|
||||
[Token(Token = "0x2000C8F")]
|
||||
private enum EncapsulateMode
|
||||
{
|
||||
// Token: 0x0400396F RID: 14703
|
||||
[Token(Token = "0x400396F")]
|
||||
BOX,
|
||||
// Token: 0x04003970 RID: 14704
|
||||
[Token(Token = "0x4003970")]
|
||||
SPHERE,
|
||||
// Token: 0x04003971 RID: 14705
|
||||
[Token(Token = "0x4003971")]
|
||||
NONE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Collections;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C8A RID: 3210
|
||||
[Token(Token = "0x2000C8A")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterLODCollection : IDisposable
|
||||
{
|
||||
// Token: 0x06004D4D RID: 19789 RVA: 0x0011F8A0 File Offset: 0x0011DAA0
|
||||
[Token(Token = "0x6004D4D")]
|
||||
[Address(RVA = "0x1B2C390", Offset = "0x1B2AD90", VA = "0x181B2C390")]
|
||||
public void InitMemory(int maxNumComponents, Allocator allocator)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D4E RID: 19790 RVA: 0x0011F8C8 File Offset: 0x0011DAC8
|
||||
[Token(Token = "0x6004D4E")]
|
||||
[Address(RVA = "0x1B2C330", Offset = "0x1B2AD30", VA = "0x181B2C330", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D4F RID: 19791 RVA: 0x0011F8D8 File Offset: 0x0011DAD8
|
||||
[Token(Token = "0x6004D4F")]
|
||||
[Address(RVA = "0x1532A30", Offset = "0x1531430", VA = "0x181532A30")]
|
||||
private float GetVolume(float3 size)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004D4F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single ClusterLOD.ClusterLODCollection::GetVolume(Unity.Mathematics.float3)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:float32(var_0_06, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](size)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06004D50 RID: 19792 RVA: 0x0011F8EC File Offset: 0x0011DAEC
|
||||
[Token(Token = "0x6004D50")]
|
||||
[Address(RVA = "0x1B2C460", Offset = "0x1B2AE60", VA = "0x181B2C460")]
|
||||
private bool IsCombinableComponent(int meshIndex)
|
||||
{
|
||||
ulong num;
|
||||
num += num;
|
||||
num += num;
|
||||
return meshIndex < 3;
|
||||
}
|
||||
|
||||
// Token: 0x06004D51 RID: 19793 RVA: 0x0011F908 File Offset: 0x0011DB08
|
||||
[Token(Token = "0x6004D51")]
|
||||
[Address(RVA = "0x1B2D420", Offset = "0x1B2BE20", VA = "0x181B2D420")]
|
||||
public void RemoveDuplicates()
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D52 RID: 19794 RVA: 0x0011FC60 File Offset: 0x0011DE60
|
||||
[Token(Token = "0x6004D52")]
|
||||
[Address(RVA = "0x1B2C490", Offset = "0x1B2AE90", VA = "0x181B2C490")]
|
||||
public void MergeComponents()
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D53 RID: 19795 RVA: 0x00120158 File Offset: 0x0011E358
|
||||
[Token(Token = "0x6004D53")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public ClusterLODCollection()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04003942 RID: 14658
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003942")]
|
||||
public NativeList<PrimitiveComponentInfo> primitiveComponentInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C73 RID: 3187
|
||||
[Token(Token = "0x2000C73")]
|
||||
[CreateAssetMenu]
|
||||
[StructLayout(3)]
|
||||
public class ClusterLODConfig : ScriptableObject
|
||||
{
|
||||
// Token: 0x06004CC5 RID: 19653 RVA: 0x0011DAF0 File Offset: 0x0011BCF0
|
||||
[Token(Token = "0x6004CC5")]
|
||||
[Address(RVA = "0x1B2DA90", Offset = "0x1B2C490", VA = "0x181B2DA90")]
|
||||
public ClusterLODConfig.LODSettings GetSettings(int lod)
|
||||
{
|
||||
if (lod != 0)
|
||||
{
|
||||
return this.far;
|
||||
}
|
||||
return this.near;
|
||||
}
|
||||
|
||||
// Token: 0x06004CC6 RID: 19654 RVA: 0x0011DB10 File Offset: 0x0011BD10
|
||||
[Token(Token = "0x6004CC6")]
|
||||
[Address(RVA = "0x1B2DA70", Offset = "0x1B2C470", VA = "0x181B2DA70")]
|
||||
public int GetMaxNumActiveLOD0Verts()
|
||||
{
|
||||
return this.maxDynamicNearVerts;
|
||||
}
|
||||
|
||||
// Token: 0x06004CC7 RID: 19655 RVA: 0x0011DB24 File Offset: 0x0011BD24
|
||||
[Token(Token = "0x6004CC7")]
|
||||
[Address(RVA = "0x1B2DAA0", Offset = "0x1B2C4A0", VA = "0x181B2DAA0")]
|
||||
public ClusterLODConfig()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400388E RID: 14478
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400388E")]
|
||||
[Header("Layer Settings")]
|
||||
public float maxRadiusForDetailObjects = 1f;
|
||||
|
||||
// Token: 0x0400388F RID: 14479
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x400388F")]
|
||||
public int maxWorldLODVerts = (int)((ulong)80000L);
|
||||
|
||||
// Token: 0x04003890 RID: 14480
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003890")]
|
||||
public int maxWorldNearVerts = (int)((ulong)30000L);
|
||||
|
||||
// Token: 0x04003891 RID: 14481
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x4003891")]
|
||||
public int maxDetailNearVerts = (int)((ulong)30000L);
|
||||
|
||||
// Token: 0x04003892 RID: 14482
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4003892")]
|
||||
public int maxDetailFarVerts = (int)((ulong)50000L);
|
||||
|
||||
// Token: 0x04003893 RID: 14483
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x4003893")]
|
||||
public int maxDynamicNearVerts = (int)((ulong)30000L);
|
||||
|
||||
// Token: 0x04003894 RID: 14484
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4003894")]
|
||||
public int maxDynamicFarVerts = (int)((ulong)50000L);
|
||||
|
||||
// Token: 0x04003895 RID: 14485
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x4003895")]
|
||||
[Header("Creation Settings")]
|
||||
public int minNumObjectPerCluster = (int)((ulong)5L);
|
||||
|
||||
// Token: 0x04003896 RID: 14486
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4003896")]
|
||||
public float distributeVSminimize = 0.5f;
|
||||
|
||||
// Token: 0x04003897 RID: 14487
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4003897")]
|
||||
[Header("Near Settings")]
|
||||
public ClusterLODConfig.LODSettings near;
|
||||
|
||||
// Token: 0x04003898 RID: 14488
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4003898")]
|
||||
[Header("Far Settings")]
|
||||
public ClusterLODConfig.LODSettings far;
|
||||
|
||||
// Token: 0x04003899 RID: 14489
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4003899")]
|
||||
public float backfaceCullingThreshold = 0.1f;
|
||||
|
||||
// Token: 0x0400389A RID: 14490
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x400389A")]
|
||||
public float triangleCullingDistFactor = 150f;
|
||||
|
||||
// Token: 0x0400389B RID: 14491
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x400389B")]
|
||||
public float LOD0VertCacheFrac = 2f;
|
||||
|
||||
// Token: 0x02000C74 RID: 3188
|
||||
[Token(Token = "0x2000C74")]
|
||||
[Serializable]
|
||||
public class LODSettings
|
||||
{
|
||||
// Token: 0x17000D59 RID: 3417
|
||||
// (get) Token: 0x06004CC8 RID: 19656 RVA: 0x0011DBC8 File Offset: 0x0011BDC8
|
||||
[Token(Token = "0x17000D59")]
|
||||
public bool ShouldSubDivide
|
||||
{
|
||||
[Token(Token = "0x6004CC8")]
|
||||
[Address(RVA = "0x1B3BC80", Offset = "0x1B3A680", VA = "0x181B3BC80")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004CC8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ClusterLOD.ClusterLODConfig/LODSettings::get_ShouldSubDivide()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_0F:
|
||||
stloc:float32(var_3_15, ldfld:float32(LODSettings::maxSubDivideDistance, ldloc:LODSettings(this)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004CC9 RID: 19657 RVA: 0x0011DBEC File Offset: 0x0011BDEC
|
||||
[Token(Token = "0x6004CC9")]
|
||||
[Address(RVA = "0x1B3BC40", Offset = "0x1B3A640", VA = "0x181B3BC40")]
|
||||
public LODSettings()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400389C RID: 14492
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400389C")]
|
||||
public float maxRadiusOfCluster = 5f;
|
||||
|
||||
// Token: 0x0400389D RID: 14493
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x400389D")]
|
||||
public int minNumVertsInCluster = (int)((ulong)2000L);
|
||||
|
||||
// Token: 0x0400389E RID: 14494
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400389E")]
|
||||
public int maxNumVertsInCluster = (int)((ulong)20000L);
|
||||
|
||||
// Token: 0x0400389F RID: 14495
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x400389F")]
|
||||
public float useLowestDetailAtSmallerRadius = 0.2f;
|
||||
|
||||
// Token: 0x040038A0 RID: 14496
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40038A0")]
|
||||
public float useHighestDetailAtGreaterRadius = 0.8f;
|
||||
|
||||
// Token: 0x040038A1 RID: 14497
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x40038A1")]
|
||||
public float maxVertSnapDist = 0.01f;
|
||||
|
||||
// Token: 0x040038A2 RID: 14498
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40038A2")]
|
||||
public float vertexNormalCombineThresh = 0.8f;
|
||||
|
||||
// Token: 0x040038A3 RID: 14499
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x40038A3")]
|
||||
public float maxSubDivideEdgeSize;
|
||||
|
||||
// Token: 0x040038A4 RID: 14500
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40038A4")]
|
||||
public float maxSubDivideDistance;
|
||||
|
||||
// Token: 0x040038A5 RID: 14501
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x40038A5")]
|
||||
public bool cullEncapsulated = true;
|
||||
|
||||
// Token: 0x040038A6 RID: 14502
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x35")]
|
||||
[Token(Token = "0x40038A6")]
|
||||
public bool useMaterials;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,888 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using RecRoom;
|
||||
using RecRoom.Core.Creation.Shapes;
|
||||
using RecRoom.Persistence;
|
||||
using Unity.Jobs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C76 RID: 3190
|
||||
[Token(Token = "0x2000C76")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterLODManager : MonoBehaviour
|
||||
{
|
||||
// Token: 0x17000D5A RID: 3418
|
||||
// (get) Token: 0x06004CCD RID: 19661 RVA: 0x0011DC58 File Offset: 0x0011BE58
|
||||
// (set) Token: 0x06004CCE RID: 19662 RVA: 0x0011DC6C File Offset: 0x0011BE6C
|
||||
[Token(Token = "0x17000D5A")]
|
||||
public ClusterLODConfig Config
|
||||
{
|
||||
[Token(Token = "0x6004CCD")]
|
||||
[Address(RVA = "0x3EE8E0", Offset = "0x3ED2E0", VA = "0x1803EE8E0")]
|
||||
get;
|
||||
[Token(Token = "0x6004CCE")]
|
||||
[Address(RVA = "0x421E00", Offset = "0x420800", VA = "0x180421E00")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x17000D5B RID: 3419
|
||||
// (get) Token: 0x06004CCF RID: 19663 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// (set) Token: 0x06004CD0 RID: 19664 RVA: 0x0011DC80 File Offset: 0x0011BE80
|
||||
[Token(Token = "0x17000D5B")]
|
||||
public Vector3 EyePos
|
||||
{
|
||||
[Token(Token = "0x6004CCF")]
|
||||
[Address(RVA = "0x10D4400", Offset = "0x10D2E00", VA = "0x1810D4400")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
[Token(Token = "0x6004CD0")]
|
||||
[Address(RVA = "0x162FC40", Offset = "0x162E640", VA = "0x18162FC40")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
float z = value.z;
|
||||
this.<EyePos>k__BackingField.z = z;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000D5C RID: 3420
|
||||
// (get) Token: 0x06004CD1 RID: 19665 RVA: 0x0011DCA0 File Offset: 0x0011BEA0
|
||||
[Token(Token = "0x17000D5C")]
|
||||
public static ClusterLODManager Instance
|
||||
{
|
||||
[Token(Token = "0x6004CD1")]
|
||||
[Address(RVA = "0x1B2FFC0", Offset = "0x1B2E9C0", VA = "0x181B2FFC0")]
|
||||
get
|
||||
{
|
||||
return ClusterLODManager._instance;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004CD2 RID: 19666 RVA: 0x0011DCB4 File Offset: 0x0011BEB4
|
||||
[Token(Token = "0x6004CD2")]
|
||||
[Address(RVA = "0x1B2E750", Offset = "0x1B2D150", VA = "0x181B2E750")]
|
||||
private void OnDestroy()
|
||||
{
|
||||
int num = 0;
|
||||
ClusterLODManager._instance = num;
|
||||
ClusterMeshAssetCache clusterMeshAssetCache = this.ClusterMeshAssetCache;
|
||||
clusterMeshAssetCache.createMeshFromClusterJob.Dispose();
|
||||
NativeClusterMesh primitiveSrcMesh = clusterMeshAssetCache._primitiveSrcMesh;
|
||||
if (primitiveSrcMesh != 0)
|
||||
{
|
||||
primitiveSrcMesh.Dispose();
|
||||
clusterMeshAssetCache._primitiveSrcMesh = num;
|
||||
}
|
||||
if (NetworkedSingletonMonoBehaviour.ONCPNMDGGKG)
|
||||
{
|
||||
RoomPersistenceManager instance = NetworkedSingletonMonoBehaviour.ONCPNMDGGKG;
|
||||
Action action = new Action(this.OnRoomStartLoad);
|
||||
instance.OEEEEIDBCDJ -= action;
|
||||
RoomPersistenceManager instance2 = NetworkedSingletonMonoBehaviour.ONCPNMDGGKG;
|
||||
Action action2 = new Action(this.OnRoomStartLoad);
|
||||
instance2.NNKFGEALMHJ -= action2;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004CD3 RID: 19667 RVA: 0x0011DD40 File Offset: 0x0011BF40
|
||||
[Token(Token = "0x6004CD3")]
|
||||
[Address(RVA = "0x1B2F040", Offset = "0x1B2DA40", VA = "0x181B2F040")]
|
||||
public static void SetSpawnPosition(Vector3 spawnPos)
|
||||
{
|
||||
ClusterLODManager instance = ClusterLODManager._instance;
|
||||
int num = 0;
|
||||
if (instance != num)
|
||||
{
|
||||
ClusterLODManager instance2 = ClusterLODManager._instance;
|
||||
float z = spawnPos.z;
|
||||
instance2.<EyePos>k__BackingField.z = z;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000D5D RID: 3421
|
||||
// (get) Token: 0x06004CD4 RID: 19668 RVA: 0x0011DD80 File Offset: 0x0011BF80
|
||||
[Token(Token = "0x17000D5D")]
|
||||
public static bool WorldCreated
|
||||
{
|
||||
[Token(Token = "0x6004CD4")]
|
||||
[Address(RVA = "0x1B30020", Offset = "0x1B2EA20", VA = "0x181B30020")]
|
||||
get
|
||||
{
|
||||
ClusterLODManager instance = ClusterLODManager._instance;
|
||||
int num = 0;
|
||||
return instance == num || ClusterLODManager._instance.CurrentState == ClusterLODManager.State.Running;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000D5E RID: 3422
|
||||
// (get) Token: 0x06004CD5 RID: 19669 RVA: 0x0011DDB4 File Offset: 0x0011BFB4
|
||||
[Token(Token = "0x17000D5E")]
|
||||
public static bool ComponentCollectionEnabled
|
||||
{
|
||||
[Token(Token = "0x6004CD5")]
|
||||
[Address(RVA = "0x1B2FEB0", Offset = "0x1B2E8B0", VA = "0x181B2FEB0")]
|
||||
get
|
||||
{
|
||||
ClusterLODManager instance = ClusterLODManager._instance;
|
||||
int num = 0;
|
||||
bool flag = instance != num;
|
||||
if (!flag)
|
||||
{
|
||||
return flag;
|
||||
}
|
||||
return ClusterLODManager._instance.CurrentState == ClusterLODManager.State.Waiting || ClusterLODManager._instance.CurrentState == ClusterLODManager.State.Collecting;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004CD6 RID: 19670 RVA: 0x0011DDFC File Offset: 0x0011BFFC
|
||||
[Token(Token = "0x6004CD6")]
|
||||
[Address(RVA = "0x1B2DC80", Offset = "0x1B2C680", VA = "0x181B2DC80")]
|
||||
private void Awake()
|
||||
{
|
||||
int num = 0;
|
||||
this.SetEnabled(num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x06004CD7 RID: 19671 RVA: 0x0011DE28 File Offset: 0x0011C028
|
||||
[Token(Token = "0x6004CD7")]
|
||||
[Address(RVA = "0x1B2F6F0", Offset = "0x1B2E0F0", VA = "0x181B2F6F0")]
|
||||
private void StopCreateWorld()
|
||||
{
|
||||
Coroutine coroutine = this.createWorldCoroutine;
|
||||
if (coroutine != 0)
|
||||
{
|
||||
base.StopCoroutine(coroutine);
|
||||
this.createWorldCoroutine = (ulong)0L;
|
||||
}
|
||||
Coroutine coroutine2 = this.assignLODsCoroutine;
|
||||
if (coroutine2 != 0)
|
||||
{
|
||||
base.StopCoroutine(coroutine2);
|
||||
this.assignLODsCoroutine = (ulong)0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004CD8 RID: 19672 RVA: 0x0011DE6C File Offset: 0x0011C06C
|
||||
[Token(Token = "0x6004CD8")]
|
||||
[Address(RVA = "0x1B2E900", Offset = "0x1B2D300", VA = "0x181B2E900")]
|
||||
private void OnRoomStartLoad()
|
||||
{
|
||||
ClusterMeshAssetCache clusterMeshAssetCache = this.ClusterMeshAssetCache;
|
||||
CreateMeshFromClusterJob createMeshFromClusterJob = clusterMeshAssetCache.createMeshFromClusterJob;
|
||||
JobHandle <jobHandle>k__BackingField = createMeshFromClusterJob.<jobHandle>k__BackingField;
|
||||
int num = 0;
|
||||
createMeshFromClusterJob.<cluster>k__BackingField = num;
|
||||
clusterMeshAssetCache.createQueue.Clear();
|
||||
SafeDestroy.GameObject(this.detailRoot);
|
||||
SafeDestroy.GameObject(this.worldRoot);
|
||||
GameObject gameObject = new GameObject("DetailRoot");
|
||||
this.detailRoot = gameObject;
|
||||
Transform transform = gameObject.transform;
|
||||
Transform transform2 = base.transform;
|
||||
transform.parent = transform2;
|
||||
GameObject gameObject2 = new GameObject("WorldRoot");
|
||||
this.worldRoot = gameObject2;
|
||||
Transform transform3 = gameObject2.transform;
|
||||
Transform transform4 = base.transform;
|
||||
transform3.parent = transform4;
|
||||
this.worldClusterMeshRenderers[num].Clear();
|
||||
this.clusterInfos[num].Clear();
|
||||
num++;
|
||||
this.newAddedStaticComponents.Clear();
|
||||
this.newAddedWorldComponents.Clear();
|
||||
this.newAddedDetailComponents.Clear();
|
||||
this.newShapeContainers.Clear();
|
||||
Coroutine coroutine = this.createWorldCoroutine;
|
||||
if (coroutine != 0)
|
||||
{
|
||||
base.StopCoroutine(coroutine);
|
||||
this.createWorldCoroutine = num;
|
||||
}
|
||||
Coroutine coroutine2 = this.assignLODsCoroutine;
|
||||
if (coroutine2 != 0)
|
||||
{
|
||||
base.StopCoroutine(coroutine2);
|
||||
this.assignLODsCoroutine = num;
|
||||
}
|
||||
this.CurrentState = (ClusterLODManager.State)num;
|
||||
ClusterLODManager.<CreateWorld>d__45 <CreateWorld>d__;
|
||||
<CreateWorld>d__.System.IDisposable.Dispose();
|
||||
<CreateWorld>d__.<>1__state = num;
|
||||
<CreateWorld>d__.<>4__this = this;
|
||||
Coroutine coroutine3 = base.StartCoroutine(<CreateWorld>d__);
|
||||
this.createWorldCoroutine = coroutine3;
|
||||
}
|
||||
|
||||
// Token: 0x06004CD9 RID: 19673 RVA: 0x0011DFD4 File Offset: 0x0011C1D4
|
||||
[Token(Token = "0x6004CD9")]
|
||||
[Address(RVA = "0x1B2F310", Offset = "0x1B2DD10", VA = "0x181B2F310")]
|
||||
private void Start()
|
||||
{
|
||||
Transform transform = base.transform;
|
||||
float z = Vector3.zero.z;
|
||||
Transform transform2 = base.transform;
|
||||
Quaternion identity = Quaternion.identity;
|
||||
GameObject gameObject = new GameObject("DetailRoot");
|
||||
this.detailRoot = gameObject;
|
||||
Transform transform3 = gameObject.transform;
|
||||
Transform transform4 = base.transform;
|
||||
transform3.parent = transform4;
|
||||
GameObject gameObject2 = new GameObject("WorldRoot");
|
||||
this.worldRoot = gameObject2;
|
||||
Transform transform5 = gameObject2.transform;
|
||||
Transform transform6 = base.transform;
|
||||
transform5.parent = transform6;
|
||||
int num = 0;
|
||||
List<ClusterMeshRenderer>[] array = this.worldClusterMeshRenderers;
|
||||
List<ClusterMeshRenderer> list = new List();
|
||||
if (list != 0)
|
||||
{
|
||||
}
|
||||
array[0] = list;
|
||||
List<ClusterMesh.ClusterInfo>[] array2 = this.clusterInfos;
|
||||
List<ClusterMesh.ClusterInfo> list2 = new List();
|
||||
if (list2 != 0)
|
||||
{
|
||||
}
|
||||
num++;
|
||||
array2[0] = list2;
|
||||
RoomPersistenceManager instance = NetworkedSingletonMonoBehaviour.ONCPNMDGGKG;
|
||||
Action action = new Action(this.OnRoomStartLoad);
|
||||
instance.OEEEEIDBCDJ += action;
|
||||
RoomPersistenceManager instance2 = NetworkedSingletonMonoBehaviour.ONCPNMDGGKG;
|
||||
Action action2 = new Action(this.OnRoomStartLoad);
|
||||
instance2.NNKFGEALMHJ += action2;
|
||||
ClusterLODManager.<CreateWorld>d__45 <CreateWorld>d__;
|
||||
<CreateWorld>d__.System.IDisposable.Dispose();
|
||||
<CreateWorld>d__.<>1__state = (int)((ulong)0L);
|
||||
<CreateWorld>d__.<>4__this = this;
|
||||
Coroutine coroutine = base.StartCoroutine(<CreateWorld>d__);
|
||||
this.createWorldCoroutine = coroutine;
|
||||
}
|
||||
|
||||
// Token: 0x06004CDA RID: 19674 RVA: 0x0011E110 File Offset: 0x0011C310
|
||||
[Token(Token = "0x6004CDA")]
|
||||
[Address(RVA = "0x1B2FCD0", Offset = "0x1B2E6D0", VA = "0x181B2FCD0")]
|
||||
private void Update()
|
||||
{
|
||||
if (this.CurrentState == ClusterLODManager.State.Running)
|
||||
{
|
||||
this.UpdateLODs();
|
||||
bool flag = this.ClusterMeshAssetCache.Update();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004CDB RID: 19675 RVA: 0x0011E140 File Offset: 0x0011C340
|
||||
[Token(Token = "0x6004CDB")]
|
||||
[Address(RVA = "0x1B2DD60", Offset = "0x1B2C760", VA = "0x181B2DD60")]
|
||||
private IEnumerator CreateWorld()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004CDB)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator ClusterLOD.ClusterLODManager::CreateWorld()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
call:void('<CreateWorld>d__45'::System.IDisposable.Dispose, ldloc:'<CreateWorld>d__45'(var_0))
|
||||
stfld:int32('<CreateWorld>d__45'::<>1__state, ldloc:'<CreateWorld>d__45'(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
|
||||
stfld:ClusterLODManager('<CreateWorld>d__45'::<>4__this, ldloc:'<CreateWorld>d__45'(var_0), ldloc:ClusterLODManager(this))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06004CDC RID: 19676 RVA: 0x0011E164 File Offset: 0x0011C364
|
||||
[Token(Token = "0x6004CDC")]
|
||||
[Address(RVA = "0x1B2E520", Offset = "0x1B2CF20", VA = "0x181B2E520")]
|
||||
public int GetDetailFromSize(bool near, Vector3 extents)
|
||||
{
|
||||
ClusterLODConfig clusterLODConfig = this.<Config>k__BackingField;
|
||||
if (near)
|
||||
{
|
||||
}
|
||||
ClusterLODConfig.LODSettings far = clusterLODConfig.far;
|
||||
float useHighestDetailAtGreaterRadius = far.useHighestDetailAtGreaterRadius;
|
||||
int num = 0;
|
||||
float useLowestDetailAtSmallerRadius = far.useLowestDetailAtSmallerRadius;
|
||||
return num + 1;
|
||||
}
|
||||
|
||||
// Token: 0x06004CDD RID: 19677 RVA: 0x0011E1A0 File Offset: 0x0011C3A0
|
||||
[Token(Token = "0x6004CDD")]
|
||||
[Address(RVA = "0x1B2F930", Offset = "0x1B2E330", VA = "0x181B2F930")]
|
||||
public void UpdateLODs()
|
||||
{
|
||||
List<ClusterMeshRenderer>[] array = this.worldClusterMeshRenderers;
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
List<ClusterMeshRenderer> list = array[num2];
|
||||
num2++;
|
||||
uint num3;
|
||||
if (num != 0 && num3 > (uint)0)
|
||||
{
|
||||
int num4 = this.clusterIndex;
|
||||
num4++;
|
||||
List<ClusterMeshRenderer>[] array2 = this.worldClusterMeshRenderers;
|
||||
int num5 = 0;
|
||||
this.clusterIndex = num2;
|
||||
int size = array2[num5]._size;
|
||||
num2 -= size;
|
||||
num5++;
|
||||
if (num5 < 3)
|
||||
{
|
||||
bool flag;
|
||||
bool flag2;
|
||||
if (flag || !flag2)
|
||||
{
|
||||
bool flag3;
|
||||
if (flag3)
|
||||
{
|
||||
GameObject gameObject;
|
||||
global::UnityEngine.Object.Destroy(gameObject);
|
||||
}
|
||||
List<ClusterMeshRenderer>[] array3 = this.worldClusterMeshRenderers;
|
||||
List<ClusterMeshRenderer> list2;
|
||||
while (list2 != 0)
|
||||
{
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
if (array2[0] != 0)
|
||||
{
|
||||
uint num6;
|
||||
int num7;
|
||||
num6 -= (uint)num7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004CDE RID: 19678 RVA: 0x0011E24C File Offset: 0x0011C44C
|
||||
[Token(Token = "0x6004CDE")]
|
||||
[Address(RVA = "0x1B2DB90", Offset = "0x1B2C590", VA = "0x181B2DB90")]
|
||||
public void AddClusterMeshRenderers(List<ClusterMeshRenderer> newClusters, ClusterLODManager.RenderLayer layer)
|
||||
{
|
||||
this.worldClusterMeshRenderers[(int)layer].AddRange(newClusters);
|
||||
}
|
||||
|
||||
// Token: 0x06004CDF RID: 19679 RVA: 0x0011E274 File Offset: 0x0011C474
|
||||
[Token(Token = "0x6004CDF")]
|
||||
[Address(RVA = "0x1B2DDC0", Offset = "0x1B2C7C0", VA = "0x181B2DDC0")]
|
||||
public List<ClusterMeshRenderer> GenerateMeshRenderers(List<IClusterLODComponent> components, Transform root, ClusterLODManager.RenderLayer layer, bool dynamic)
|
||||
{
|
||||
List<ClusterMeshRenderer> list;
|
||||
do
|
||||
{
|
||||
list = new List();
|
||||
ClusterLODConfig clusterLODConfig = this.<Config>k__BackingField;
|
||||
ClusterLODConfig.LODSettings near = clusterLODConfig.near;
|
||||
int maxNumVertsInCluster = near.maxNumVertsInCluster;
|
||||
float maxRadiusOfCluster = near.maxRadiusOfCluster;
|
||||
int minNumObjectPerCluster = clusterLODConfig.minNumObjectPerCluster;
|
||||
float distributeVSminimize = clusterLODConfig.distributeVSminimize;
|
||||
ClusterTreeGenerator clusterTreeGenerator;
|
||||
clusterTreeGenerator.minNumVerts = clusterTreeGenerator;
|
||||
clusterTreeGenerator.maxNumVerts = maxNumVertsInCluster;
|
||||
clusterTreeGenerator.maxRadius = maxRadiusOfCluster;
|
||||
clusterTreeGenerator.minNumObjectPerCluster = minNumObjectPerCluster;
|
||||
clusterTreeGenerator.distributeVSminimize = distributeVSminimize;
|
||||
ClusterNode clusterNode;
|
||||
clusterNode.parent = (ulong)0L;
|
||||
clusterNode.components = components;
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int vertexCount = ClusterUtil.GetVertexCount(components, num2);
|
||||
clusterNode.vertexCount = vertexCount;
|
||||
List<ClusterNode> list2 = new List();
|
||||
ClusterTree clusterTree;
|
||||
clusterTree.Nodes = list2;
|
||||
int num3 = 0;
|
||||
clusterTree.FieldGetter(num3, num, layer);
|
||||
clusterTree.<Root>k__BackingField = num3;
|
||||
clusterTree.Nodes.Add(num3);
|
||||
clusterTreeGenerator.<Tree>k__BackingField = clusterTree;
|
||||
Stack<ClusterNode> stack = new Stack();
|
||||
clusterTreeGenerator.unProcessedClusters = stack;
|
||||
ClusterNode <Root>k__BackingField = clusterTreeGenerator.<Tree>k__BackingField.<Root>k__BackingField;
|
||||
stack.Push(<Root>k__BackingField);
|
||||
ClusterNode clusterNode2 = clusterTreeGenerator.unProcessedClusters.Pop();
|
||||
int num4 = 0;
|
||||
bool flag = clusterTreeGenerator.SplitCluster(clusterNode2);
|
||||
Stack<ClusterNode> unProcessedClusters = clusterTreeGenerator.unProcessedClusters;
|
||||
ClusterLODConfig.LODSettings far = this.<Config>k__BackingField.far;
|
||||
int minNumVertsInCluster = far.minNumVertsInCluster;
|
||||
int maxNumVertsInCluster2 = far.maxNumVertsInCluster;
|
||||
float maxRadiusOfCluster2 = far.maxRadiusOfCluster;
|
||||
int num5 = 0;
|
||||
ClusterMeshGenerator clusterMeshGenerator;
|
||||
clusterMeshGenerator.FieldGetter(num5, num4, layer);
|
||||
clusterMeshGenerator.minNumVerts = minNumVertsInCluster;
|
||||
clusterMeshGenerator.maxNumVerts = maxNumVertsInCluster2;
|
||||
clusterMeshGenerator.maxDiameterSq = maxRadiusOfCluster2;
|
||||
ClusterTree <Tree>k__BackingField = clusterTreeGenerator.<Tree>k__BackingField;
|
||||
List<ClusterMesh> list3 = new List();
|
||||
clusterMeshGenerator.<Meshes>k__BackingField = list3;
|
||||
ClusterNode <Root>k__BackingField2 = <Tree>k__BackingField.<Root>k__BackingField;
|
||||
int num6 = clusterMeshGenerator.UpdateVertexCount(<Root>k__BackingField2);
|
||||
ClusterNode <Root>k__BackingField3 = <Tree>k__BackingField.<Root>k__BackingField;
|
||||
clusterMeshGenerator.CreateClusterMeshInstances(<Root>k__BackingField3);
|
||||
List<ClusterMesh> <Meshes>k__BackingField = clusterMeshGenerator.<Meshes>k__BackingField;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
ClusterMeshRenderer clusterMeshRenderer = this.clusterMeshRendererPrefab;
|
||||
ClusterMeshRenderer clusterMeshRenderer2;
|
||||
MeshRenderer component = clusterMeshRenderer2.GetComponent<MeshRenderer>();
|
||||
Material meshMaterial = ClusterLODManager._instance.GetMeshMaterial();
|
||||
component.SetMaterial(meshMaterial);
|
||||
clusterMeshRenderer2.<Dynamic>k__BackingField = meshMaterial != null;
|
||||
clusterMeshRenderer2.GenerateLOD();
|
||||
List.Enumerator enumerator2;
|
||||
if (enumerator2 != 0)
|
||||
{
|
||||
}
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
if (component != 0)
|
||||
{
|
||||
goto IL_211;
|
||||
}
|
||||
}
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
}
|
||||
while (this != 0);
|
||||
return list;
|
||||
IL_211:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004CE0 RID: 19680 RVA: 0x0011E4B8 File Offset: 0x0011C6B8
|
||||
[Token(Token = "0x6004CE0")]
|
||||
[Address(RVA = "0x1B2E710", Offset = "0x1B2D110", VA = "0x181B2E710")]
|
||||
public ClusterLODManager.RenderLayer GetRenderLayer(Vector3 extents)
|
||||
{
|
||||
float maxRadiusForDetailObjects = this.<Config>k__BackingField.maxRadiusForDetailObjects;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004CE1 RID: 19681 RVA: 0x0011E4D8 File Offset: 0x0011C6D8
|
||||
[Token(Token = "0x6004CE1")]
|
||||
[Address(RVA = "0x1B2EC90", Offset = "0x1B2D690", VA = "0x181B2EC90")]
|
||||
public void RegisterShapeContainer(ShapeContainer newShapeContainer)
|
||||
{
|
||||
this.newShapeContainers.Add(newShapeContainer);
|
||||
}
|
||||
|
||||
// Token: 0x06004CE2 RID: 19682 RVA: 0x0011E4F8 File Offset: 0x0011C6F8
|
||||
[Token(Token = "0x6004CE2")]
|
||||
[Address(RVA = "0x1B2F740", Offset = "0x1B2E140", VA = "0x181B2F740")]
|
||||
public bool TryDeRegisterShapeContainer(ShapeContainer newShapeContainer)
|
||||
{
|
||||
return this.newShapeContainers.Remove(newShapeContainer);
|
||||
}
|
||||
|
||||
// Token: 0x06004CE3 RID: 19683 RVA: 0x0011E518 File Offset: 0x0011C718
|
||||
[Token(Token = "0x6004CE3")]
|
||||
[Address(RVA = "0x1B2EC30", Offset = "0x1B2D630", VA = "0x181B2EC30")]
|
||||
public void RegisterComponent(IClusterLODComponent newComponent)
|
||||
{
|
||||
this.newAddedStaticComponents.Add(newComponent);
|
||||
}
|
||||
|
||||
// Token: 0x06004CE4 RID: 19684 RVA: 0x0011E538 File Offset: 0x0011C738
|
||||
[Token(Token = "0x6004CE4")]
|
||||
[Address(RVA = "0x1B2DB00", Offset = "0x1B2C500", VA = "0x181B2DB00")]
|
||||
private void AddClusterMeshClusterInfo(ClusterMesh.ClusterInfo info, int layer)
|
||||
{
|
||||
this.clusterInfos[layer].Add(info);
|
||||
}
|
||||
|
||||
// Token: 0x06004CE5 RID: 19685 RVA: 0x0011E560 File Offset: 0x0011C760
|
||||
[Token(Token = "0x6004CE5")]
|
||||
[Address(RVA = "0x1B2ECF0", Offset = "0x1B2D6F0", VA = "0x181B2ECF0")]
|
||||
public void RemoveClusterMeshClusterInfo(ClusterMesh.ClusterInfo info)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = this.clusterInfos[num].IndexOf(info);
|
||||
this.clusterInfos[num].RemoveAt(num2);
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x06004CE6 RID: 19686 RVA: 0x0011E5A0 File Offset: 0x0011C7A0
|
||||
[Token(Token = "0x6004CE6")]
|
||||
[Address(RVA = "0x1B2F1F0", Offset = "0x1B2DBF0", VA = "0x181B2F1F0")]
|
||||
private void SortClusterInfos(Vector3 pos, ClusterLODManager.RenderLayer layer)
|
||||
{
|
||||
List<ClusterMesh.ClusterInfo> list = this.clusterInfos[(int)layer];
|
||||
Comparison<ClusterMesh.ClusterInfo> <>9__57_ = ClusterLODManager.<>c.<>9__57_0;
|
||||
if (<>9__57_ == 0)
|
||||
{
|
||||
ClusterLODManager.<>c.<>9__57_0 = delegate(ClusterMesh.ClusterInfo a, ClusterMesh.ClusterInfo b)
|
||||
{
|
||||
byte requestedLod = b.requestedLod;
|
||||
throw new NullReferenceException();
|
||||
};
|
||||
}
|
||||
list.Sort(<>9__57_);
|
||||
}
|
||||
|
||||
// Token: 0x06004CE7 RID: 19687 RVA: 0x0011E5E8 File Offset: 0x0011C7E8
|
||||
[Token(Token = "0x6004CE7")]
|
||||
[Address(RVA = "0x1B2F7A0", Offset = "0x1B2E1A0", VA = "0x181B2F7A0")]
|
||||
private void UpdateClusterDistances(Vector3 pos, ClusterLODManager.RenderLayer layer)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
List<ClusterMeshRenderer> list = this.worldClusterMeshRenderers[(int)layer];
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x06004CE8 RID: 19688 RVA: 0x0011E620 File Offset: 0x0011C820
|
||||
[Token(Token = "0x6004CE8")]
|
||||
[Address(RVA = "0x1B2DC20", Offset = "0x1B2C620", VA = "0x181B2DC20")]
|
||||
private IEnumerator AssignLODs()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004CE8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator ClusterLOD.ClusterLODManager::AssignLODs()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
call:void('<AssignLODs>d__59'::System.IDisposable.Dispose, ldloc:'<AssignLODs>d__59'(var_0))
|
||||
stfld:int32('<AssignLODs>d__59'::<>1__state, ldloc:'<AssignLODs>d__59'(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
|
||||
stfld:ClusterLODManager('<AssignLODs>d__59'::<>4__this, ldloc:'<AssignLODs>d__59'(var_0), ldloc:ClusterLODManager(this))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06004CE9 RID: 19689 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004CE9")]
|
||||
[Address(RVA = "0x1B2FBD0", Offset = "0x1B2E5D0", VA = "0x181B2FBD0")]
|
||||
private int UpdateLodRequest(int index, int budget, List<ClusterMesh.ClusterInfo> clusters, byte lod, ref int numVertsToSpare, float minDist = 0f)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004CEA RID: 19690 RVA: 0x0011E644 File Offset: 0x0011C844
|
||||
[Token(Token = "0x6004CEA")]
|
||||
[Address(RVA = "0x1B2EDD0", Offset = "0x1B2D7D0", VA = "0x181B2EDD0")]
|
||||
public void Remove(IClusterLODComponent component)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (num >= 3)
|
||||
{
|
||||
break;
|
||||
}
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
bool flag;
|
||||
while (!flag)
|
||||
{
|
||||
}
|
||||
}
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
if (0UL == (ulong)104L)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (0UL == (ulong)96L)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x06004CEB RID: 19691 RVA: 0x0011E6A0 File Offset: 0x0011C8A0
|
||||
[Token(Token = "0x6004CEB")]
|
||||
[Address(RVA = "0x1B2F1B0", Offset = "0x1B2DBB0", VA = "0x181B2F1B0")]
|
||||
public bool ShouldUpdateDetailMeshes()
|
||||
{
|
||||
ClusterLODConfig.LODSettings near = this.<Config>k__BackingField.near;
|
||||
float maxSubDivideEdgeSize = near.maxSubDivideEdgeSize;
|
||||
int num = 0;
|
||||
if (maxSubDivideEdgeSize <= (float)num)
|
||||
{
|
||||
}
|
||||
float maxSubDivideDistance = near.maxSubDivideDistance;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004CEC RID: 19692 RVA: 0x0011E6D8 File Offset: 0x0011C8D8
|
||||
[Token(Token = "0x6004CEC")]
|
||||
[Address(RVA = "0x1B2EC20", Offset = "0x1B2D620", VA = "0x181B2EC20")]
|
||||
public void RegisterAdditionalVertsChange(int change)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004CED RID: 19693 RVA: 0x0011E6E8 File Offset: 0x0011C8E8
|
||||
[Token(Token = "0x6004CED")]
|
||||
[Address(RVA = "0x1B2E670", Offset = "0x1B2D070", VA = "0x181B2E670")]
|
||||
public Material GetMeshMaterial()
|
||||
{
|
||||
Material material = this.sharedMeshMaterial;
|
||||
int num = 0;
|
||||
if (material == num)
|
||||
{
|
||||
Material material2 = EOKPFJPCGMK.OAEGHKNCLCN(ACBDPBHGKJL.Box);
|
||||
this.sharedMeshMaterial = material2;
|
||||
}
|
||||
return this.sharedMeshMaterial;
|
||||
}
|
||||
|
||||
// Token: 0x06004CEE RID: 19694 RVA: 0x0011E71C File Offset: 0x0011C91C
|
||||
[Token(Token = "0x6004CEE")]
|
||||
[Address(RVA = "0x1B2E630", Offset = "0x1B2D030", VA = "0x181B2E630")]
|
||||
public int GetMaxNumActiveLOD0Verts()
|
||||
{
|
||||
return this.<Config>k__BackingField.maxDynamicNearVerts;
|
||||
}
|
||||
|
||||
// Token: 0x06004CEF RID: 19695 RVA: 0x0011E73C File Offset: 0x0011C93C
|
||||
[Token(Token = "0x6004CEF")]
|
||||
[Address(RVA = "0x1B2FD10", Offset = "0x1B2E710", VA = "0x181B2FD10")]
|
||||
public ClusterLODManager()
|
||||
{
|
||||
ClusterMeshAssetCache clusterMeshAssetCache = new ClusterMeshAssetCache();
|
||||
Queue<ClusterMesh.ClusterInfo> queue = new Queue();
|
||||
clusterMeshAssetCache.createQueue = queue;
|
||||
CreateMeshFromClusterJob createMeshFromClusterJob = new CreateMeshFromClusterJob();
|
||||
clusterMeshAssetCache.createMeshFromClusterJob = createMeshFromClusterJob;
|
||||
List<ClusterMesh.ClusterInfo> list = new List();
|
||||
clusterMeshAssetCache.activeClusters = list;
|
||||
this.ClusterMeshAssetCache = clusterMeshAssetCache;
|
||||
List<IClusterLODComponent> list2 = new List();
|
||||
this.newAddedStaticComponents = list2;
|
||||
List<IClusterLODComponent> list3 = new List();
|
||||
this.newAddedWorldComponents = list3;
|
||||
List<IClusterLODComponent> list4 = new List();
|
||||
this.newAddedDetailComponents = list4;
|
||||
List<ClusterMeshRenderer>[] array = new List<ClusterMeshRenderer>[3];
|
||||
this.worldClusterMeshRenderers = array;
|
||||
List<ClusterMesh.ClusterInfo>[] array2 = new List<ClusterMesh.ClusterInfo>[3];
|
||||
this.clusterInfos = array2;
|
||||
List<ShapeContainer> list5 = new List();
|
||||
this.newShapeContainers = list5;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x06004CF0 RID: 19696 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6004CF0")]
|
||||
[Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60")]
|
||||
static ClusterLODManager()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x040038B3 RID: 14515
|
||||
[Token(Token = "0x40038B3")]
|
||||
public const int NUM_RENDER_LAYERS = 3;
|
||||
|
||||
// Token: 0x040038B4 RID: 14516
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40038B4")]
|
||||
public ClusterLODConfig questConfig;
|
||||
|
||||
// Token: 0x040038B5 RID: 14517
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40038B5")]
|
||||
public ClusterLODConfig ps4Config;
|
||||
|
||||
// Token: 0x040038B6 RID: 14518
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40038B6")]
|
||||
public ClusterLODConfig iOSConfig;
|
||||
|
||||
// Token: 0x040038B7 RID: 14519
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40038B7")]
|
||||
public ClusterLODConfig iOSLowConfig;
|
||||
|
||||
// Token: 0x040038B9 RID: 14521
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40038B9")]
|
||||
public ClusterMeshRenderer clusterMeshRendererPrefab;
|
||||
|
||||
// Token: 0x040038BA RID: 14522
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40038BA")]
|
||||
public MeshFilter clusterPrefab;
|
||||
|
||||
// Token: 0x040038BB RID: 14523
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40038BB")]
|
||||
private GameObject detailRoot;
|
||||
|
||||
// Token: 0x040038BC RID: 14524
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40038BC")]
|
||||
private GameObject worldRoot;
|
||||
|
||||
// Token: 0x040038BD RID: 14525
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40038BD")]
|
||||
public ClusterMeshAssetCache ClusterMeshAssetCache;
|
||||
|
||||
// Token: 0x040038BE RID: 14526
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40038BE")]
|
||||
public List<IClusterLODComponent> newAddedStaticComponents;
|
||||
|
||||
// Token: 0x040038BF RID: 14527
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40038BF")]
|
||||
public List<IClusterLODComponent> newAddedWorldComponents;
|
||||
|
||||
// Token: 0x040038C0 RID: 14528
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x40038C0")]
|
||||
public List<IClusterLODComponent> newAddedDetailComponents;
|
||||
|
||||
// Token: 0x040038C1 RID: 14529
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x40038C1")]
|
||||
private int clusterIndex;
|
||||
|
||||
// Token: 0x040038C3 RID: 14531
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x40038C3")]
|
||||
public ClusterLODManager.State CurrentState;
|
||||
|
||||
// Token: 0x040038C4 RID: 14532
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x98")]
|
||||
[Token(Token = "0x40038C4")]
|
||||
public List<ClusterMeshRenderer>[] worldClusterMeshRenderers;
|
||||
|
||||
// Token: 0x040038C5 RID: 14533
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x40038C5")]
|
||||
private List<ClusterMesh.ClusterInfo>[] clusterInfos;
|
||||
|
||||
// Token: 0x040038C6 RID: 14534
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA8")]
|
||||
[Token(Token = "0x40038C6")]
|
||||
private Coroutine createWorldCoroutine;
|
||||
|
||||
// Token: 0x040038C7 RID: 14535
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x40038C7")]
|
||||
private Coroutine assignLODsCoroutine;
|
||||
|
||||
// Token: 0x040038C8 RID: 14536
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB8")]
|
||||
[Token(Token = "0x40038C8")]
|
||||
public int estimatedNumWorldLODVerts;
|
||||
|
||||
// Token: 0x040038C9 RID: 14537
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xBC")]
|
||||
[Token(Token = "0x40038C9")]
|
||||
public int numWorldLODVerts;
|
||||
|
||||
// Token: 0x040038CA RID: 14538
|
||||
[Token(Token = "0x40038CA")]
|
||||
private static ClusterLODManager _instance;
|
||||
|
||||
// Token: 0x040038CB RID: 14539
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC0")]
|
||||
[Token(Token = "0x40038CB")]
|
||||
private List<ShapeContainer> newShapeContainers;
|
||||
|
||||
// Token: 0x040038CC RID: 14540
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC8")]
|
||||
[Token(Token = "0x40038CC")]
|
||||
public int numAdditionalVerts;
|
||||
|
||||
// Token: 0x040038CD RID: 14541
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xD0")]
|
||||
[Token(Token = "0x40038CD")]
|
||||
private Material sharedMeshMaterial;
|
||||
|
||||
// Token: 0x02000C77 RID: 3191
|
||||
[Token(Token = "0x2000C77")]
|
||||
public enum RenderLayer
|
||||
{
|
||||
// Token: 0x040038CF RID: 14543
|
||||
[Token(Token = "0x40038CF")]
|
||||
World,
|
||||
// Token: 0x040038D0 RID: 14544
|
||||
[Token(Token = "0x40038D0")]
|
||||
Detail,
|
||||
// Token: 0x040038D1 RID: 14545
|
||||
[Token(Token = "0x40038D1")]
|
||||
Dynamic,
|
||||
// Token: 0x040038D2 RID: 14546
|
||||
[Token(Token = "0x40038D2")]
|
||||
NumLayers
|
||||
}
|
||||
|
||||
// Token: 0x02000C78 RID: 3192
|
||||
[Token(Token = "0x2000C78")]
|
||||
public enum State
|
||||
{
|
||||
// Token: 0x040038D4 RID: 14548
|
||||
[Token(Token = "0x40038D4")]
|
||||
Waiting,
|
||||
// Token: 0x040038D5 RID: 14549
|
||||
[Token(Token = "0x40038D5")]
|
||||
Collecting,
|
||||
// Token: 0x040038D6 RID: 14550
|
||||
[Token(Token = "0x40038D6")]
|
||||
Generating,
|
||||
// Token: 0x040038D7 RID: 14551
|
||||
[Token(Token = "0x40038D7")]
|
||||
Running
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C7C RID: 3196
|
||||
[Token(Token = "0x2000C7C")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterLODManagerEditorDebug : MonoBehaviour
|
||||
{
|
||||
// Token: 0x06004D03 RID: 19715 RVA: 0x0011EE70 File Offset: 0x0011D070
|
||||
[Token(Token = "0x6004D03")]
|
||||
[Address(RVA = "0x3C1210", Offset = "0x3BFC10", VA = "0x1803C1210")]
|
||||
public ClusterLODManagerEditorDebug()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C7D RID: 3197
|
||||
[Token(Token = "0x2000C7D")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 160)]
|
||||
public struct ClusterLODMergeVertsJob : IJob
|
||||
{
|
||||
// Token: 0x06004D04 RID: 19716 RVA: 0x0011EE84 File Offset: 0x0011D084
|
||||
[Token(Token = "0x6004D04")]
|
||||
[Address(RVA = "0x23E850", Offset = "0x23DC50", VA = "0x18023E850")]
|
||||
public ClusterLODMergeVertsJob(NativeClusterMesh mesh, NativeList<float3> origVerts, NativeMultiHashMap<int, int> vertexMap, NativeArray<int> indexRemap, Vector3 centerPos, float resolution)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D05 RID: 19717 RVA: 0x0011EE94 File Offset: 0x0011D094
|
||||
[Token(Token = "0x6004D05")]
|
||||
[Address(RVA = "0x23E810", Offset = "0x23DC10", VA = "0x18023E810")]
|
||||
private int GetKey(float3 pos)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06004D05)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 ClusterLOD.ClusterLODMergeVertsJob::GetKey(Unity.Mathematics.float3)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:float32(var_0_06, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](pos)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06004D06 RID: 19718 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D06")]
|
||||
[Address(RVA = "0x23E840", Offset = "0x23DC40", VA = "0x18023E840")]
|
||||
private int GetMatch(int i, int key)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D07 RID: 19719 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D07")]
|
||||
[Address(RVA = "0x23E800", Offset = "0x23DC00", VA = "0x18023E800", Slot = "4")]
|
||||
public void Execute()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x040038E4 RID: 14564
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x40038E4")]
|
||||
private NativeList<float3> verts;
|
||||
|
||||
// Token: 0x040038E5 RID: 14565
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40038E5")]
|
||||
private NativeArray<float3> normals;
|
||||
|
||||
// Token: 0x040038E6 RID: 14566
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40038E6")]
|
||||
private NativeArray<float4> tangents;
|
||||
|
||||
// Token: 0x040038E7 RID: 14567
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40038E7")]
|
||||
private NativeArray<float2> UVs;
|
||||
|
||||
// Token: 0x040038E8 RID: 14568
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40038E8")]
|
||||
private NativeArray<float4> materialIndices;
|
||||
|
||||
// Token: 0x040038E9 RID: 14569
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40038E9")]
|
||||
private NativeList<int> indices;
|
||||
|
||||
// Token: 0x040038EA RID: 14570
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40038EA")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> origVerts;
|
||||
|
||||
// Token: 0x040038EB RID: 14571
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40038EB")]
|
||||
[ReadOnly]
|
||||
private float3 centerPos;
|
||||
|
||||
// Token: 0x040038EC RID: 14572
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x7C")]
|
||||
[Token(Token = "0x40038EC")]
|
||||
[ReadOnly]
|
||||
private float resolution;
|
||||
|
||||
// Token: 0x040038ED RID: 14573
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x40038ED")]
|
||||
private NativeMultiHashMap<int, int> vertexMap;
|
||||
|
||||
// Token: 0x040038EE RID: 14574
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x40038EE")]
|
||||
private NativeArray<int> indexRemap;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using RecRoom;
|
||||
using Unity.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C85 RID: 3205
|
||||
[Token(Token = "0x2000C85")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterMesh : IDisposable
|
||||
{
|
||||
// Token: 0x17000D63 RID: 3427
|
||||
// (get) Token: 0x06004D26 RID: 19750 RVA: 0x0011EFF4 File Offset: 0x0011D1F4
|
||||
// (set) Token: 0x06004D27 RID: 19751 RVA: 0x0011F008 File Offset: 0x0011D208
|
||||
[Token(Token = "0x17000D63")]
|
||||
public Mesh Mesh
|
||||
{
|
||||
[Token(Token = "0x6004D26")]
|
||||
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
||||
get;
|
||||
[Token(Token = "0x6004D27")]
|
||||
[Address(RVA = "0x3C1270", Offset = "0x3BFC70", VA = "0x1803C1270")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x17000D64 RID: 3428
|
||||
// (get) Token: 0x06004D28 RID: 19752 RVA: 0x0011F01C File Offset: 0x0011D21C
|
||||
// (set) Token: 0x06004D29 RID: 19753 RVA: 0x0011F030 File Offset: 0x0011D230
|
||||
[Token(Token = "0x17000D64")]
|
||||
public bool Dirty
|
||||
{
|
||||
[Token(Token = "0x6004D28")]
|
||||
[Address(RVA = "0x421DE0", Offset = "0x4207E0", VA = "0x180421DE0")]
|
||||
get;
|
||||
[Token(Token = "0x6004D29")]
|
||||
[Address(RVA = "0x421DF0", Offset = "0x4207F0", VA = "0x180421DF0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x17000D65 RID: 3429
|
||||
// (get) Token: 0x06004D2A RID: 19754 RVA: 0x0011F044 File Offset: 0x0011D244
|
||||
[Token(Token = "0x17000D65")]
|
||||
public int MaxNumLOD1Indices
|
||||
{
|
||||
[Token(Token = "0x6004D2A")]
|
||||
[Address(RVA = "0x1B354A0", Offset = "0x1B33EA0", VA = "0x181B354A0")]
|
||||
get
|
||||
{
|
||||
ClusterMeshUpdateJobData clusterMeshUpdateJobData = this.updateData;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D2B RID: 19755 RVA: 0x0011F060 File Offset: 0x0011D260
|
||||
[Token(Token = "0x6004D2B")]
|
||||
[Address(RVA = "0x1B34260", Offset = "0x1B32C60", VA = "0x181B34260", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
SafeDestroy.Asset(this.<Mesh>k__BackingField);
|
||||
this.<Mesh>k__BackingField = num;
|
||||
List<ClusterMesh.ClusterInfo> clusters = this.Clusters;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
this.Clusters.Clear();
|
||||
this.updateData.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x06004D2C RID: 19756 RVA: 0x0011F0B8 File Offset: 0x0011D2B8
|
||||
[Token(Token = "0x6004D2C")]
|
||||
[Address(RVA = "0x1B34D00", Offset = "0x1B33700", VA = "0x181B34D00")]
|
||||
public int GetLod(int clusterIdx)
|
||||
{
|
||||
NativeArray<int> componentLod = this.updateData.componentLod;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D2D RID: 19757 RVA: 0x0011F0D8 File Offset: 0x0011D2D8
|
||||
[Token(Token = "0x6004D2D")]
|
||||
[Address(RVA = "0x1B34140", Offset = "0x1B32B40", VA = "0x181B34140")]
|
||||
public void AddClusterNode(ClusterNode ownerNode)
|
||||
{
|
||||
ClusterMesh.ClusterInfo clusterInfo = new ClusterMesh.ClusterInfo();
|
||||
List<IClusterLODComponent> list = new List();
|
||||
clusterInfo.components = list;
|
||||
NativeClusterMesh nativeClusterMesh = new NativeClusterMesh();
|
||||
clusterInfo.nativeMesh = nativeClusterMesh;
|
||||
SubdivideMeshData subdivideMeshData = new SubdivideMeshData();
|
||||
clusterInfo.subdivideMeshData = subdivideMeshData;
|
||||
List<IClusterLODComponent> components = ownerNode.components;
|
||||
clusterInfo.components = components;
|
||||
Bounds bounds = ownerNode.bounds;
|
||||
clusterInfo.bounds = bounds;
|
||||
clusterInfo.requestedLod = (byte)((ulong)1L);
|
||||
this.Clusters.Add(clusterInfo);
|
||||
}
|
||||
|
||||
// Token: 0x06004D2E RID: 19758 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D2E")]
|
||||
[Address(RVA = "0x1B345C0", Offset = "0x1B32FC0", VA = "0x181B345C0")]
|
||||
public void GenerateLODMesh(Transform root, bool dynamicCluster)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D2F RID: 19759 RVA: 0x0011F150 File Offset: 0x0011D350
|
||||
[Token(Token = "0x6004D2F")]
|
||||
[Address(RVA = "0x1B343E0", Offset = "0x1B32DE0", VA = "0x181B343E0")]
|
||||
public bool FinalizeUpdate(bool setOrigIndices)
|
||||
{
|
||||
ClusterMeshUpdateJobData clusterMeshUpdateJobData = this.updateData;
|
||||
if (!clusterMeshUpdateJobData.<IsActive>k__BackingField)
|
||||
{
|
||||
}
|
||||
clusterMeshUpdateJobData.<IsActive>k__BackingField = false;
|
||||
Mesh mesh = this.<Mesh>k__BackingField;
|
||||
int num = 0;
|
||||
if (!(mesh == num))
|
||||
{
|
||||
this.<Mesh>k__BackingField.subMeshCount = 2;
|
||||
NativeList<int> indices = clusterMeshUpdateJobData.indices;
|
||||
Mesh mesh2 = this.<Mesh>k__BackingField;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
List<int> list;
|
||||
mesh2.SetTriangles(list, num3, num2 != 0);
|
||||
if (setOrigIndices)
|
||||
{
|
||||
NativeList<int> origIndices = clusterMeshUpdateJobData.origIndices;
|
||||
Mesh mesh3 = this.<Mesh>k__BackingField;
|
||||
int num4 = 0;
|
||||
List<int> list2;
|
||||
mesh3.SetTriangles(list2, 1, num4 != 0);
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D30 RID: 19760 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D30")]
|
||||
[Address(RVA = "0x1B34FB0", Offset = "0x1B339B0", VA = "0x181B34FB0")]
|
||||
public void UpdateMesh(Transform root, bool dynamicCluster)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D31 RID: 19761 RVA: 0x0011F1E4 File Offset: 0x0011D3E4
|
||||
[Token(Token = "0x6004D31")]
|
||||
[Address(RVA = "0x1B34D30", Offset = "0x1B33730", VA = "0x181B34D30")]
|
||||
public bool Remove(IClusterLODComponent component)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
List<ClusterMesh.ClusterInfo> clusters = this.Clusters;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
int num2;
|
||||
while (num2 == -1)
|
||||
{
|
||||
}
|
||||
this.updateData.<IsActive>k__BackingField = false;
|
||||
this.<Dirty>k__BackingField = true;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D32 RID: 19762 RVA: 0x0011F258 File Offset: 0x0011D458
|
||||
[Token(Token = "0x6004D32")]
|
||||
[Address(RVA = "0x1B35420", Offset = "0x1B33E20", VA = "0x181B35420")]
|
||||
public ClusterMesh()
|
||||
{
|
||||
List<ClusterMesh.ClusterInfo> list = new List();
|
||||
this.Clusters = list;
|
||||
ClusterMeshUpdateJobData clusterMeshUpdateJobData = new ClusterMeshUpdateJobData();
|
||||
this.updateData = clusterMeshUpdateJobData;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x04003929 RID: 14633
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003929")]
|
||||
public Bounds bounds;
|
||||
|
||||
// Token: 0x0400392B RID: 14635
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400392B")]
|
||||
public List<ClusterMesh.ClusterInfo> Clusters;
|
||||
|
||||
// Token: 0x0400392C RID: 14636
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400392C")]
|
||||
public ClusterMeshUpdateJobData updateData;
|
||||
|
||||
// Token: 0x0400392E RID: 14638
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400392E")]
|
||||
public ClusterMeshRenderer owner;
|
||||
|
||||
// Token: 0x02000C86 RID: 3206
|
||||
[Token(Token = "0x2000C86")]
|
||||
public class ClusterInfo : IDisposable
|
||||
{
|
||||
// Token: 0x17000D66 RID: 3430
|
||||
// (get) Token: 0x06004D33 RID: 19763 RVA: 0x0011F288 File Offset: 0x0011D488
|
||||
// (set) Token: 0x06004D34 RID: 19764 RVA: 0x0011F29C File Offset: 0x0011D49C
|
||||
[Token(Token = "0x17000D66")]
|
||||
public Mesh RequestedMesh
|
||||
{
|
||||
[Token(Token = "0x6004D33")]
|
||||
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
|
||||
get;
|
||||
[Token(Token = "0x6004D34")]
|
||||
[Address(RVA = "0x3C1290", Offset = "0x3BFC90", VA = "0x1803C1290")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x17000D67 RID: 3431
|
||||
// (get) Token: 0x06004D35 RID: 19765 RVA: 0x0011F2B0 File Offset: 0x0011D4B0
|
||||
// (set) Token: 0x06004D36 RID: 19766 RVA: 0x0011F2C4 File Offset: 0x0011D4C4
|
||||
[Token(Token = "0x17000D67")]
|
||||
public Mesh ActiveMesh
|
||||
{
|
||||
[Token(Token = "0x6004D35")]
|
||||
[Address(RVA = "0x3EE8E0", Offset = "0x3ED2E0", VA = "0x1803EE8E0")]
|
||||
get;
|
||||
[Token(Token = "0x6004D36")]
|
||||
[Address(RVA = "0x421E00", Offset = "0x420800", VA = "0x180421E00")]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x06004D37 RID: 19767 RVA: 0x0011F2D8 File Offset: 0x0011D4D8
|
||||
[Token(Token = "0x6004D37")]
|
||||
[Address(RVA = "0x1B2C160", Offset = "0x1B2AB60", VA = "0x181B2C160")]
|
||||
public void RequestNewMesh(Mesh mesh)
|
||||
{
|
||||
Mesh mesh2 = this.<RequestedMesh>k__BackingField;
|
||||
Mesh mesh3 = this.<ActiveMesh>k__BackingField;
|
||||
if (mesh2 != mesh3)
|
||||
{
|
||||
SafeDestroy.Asset(this.<RequestedMesh>k__BackingField);
|
||||
}
|
||||
this.<RequestedMesh>k__BackingField = mesh;
|
||||
}
|
||||
|
||||
// Token: 0x06004D38 RID: 19768 RVA: 0x0011F310 File Offset: 0x0011D510
|
||||
[Token(Token = "0x6004D38")]
|
||||
[Address(RVA = "0x1B2C200", Offset = "0x1B2AC00", VA = "0x181B2C200")]
|
||||
public void RequestRemoveMesh()
|
||||
{
|
||||
Mesh mesh = this.<RequestedMesh>k__BackingField;
|
||||
Mesh mesh2 = this.<ActiveMesh>k__BackingField;
|
||||
if (mesh != mesh2)
|
||||
{
|
||||
SafeDestroy.Asset(this.<RequestedMesh>k__BackingField);
|
||||
}
|
||||
this.<RequestedMesh>k__BackingField = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x06004D39 RID: 19769 RVA: 0x0011F34C File Offset: 0x0011D54C
|
||||
[Token(Token = "0x6004D39")]
|
||||
[Address(RVA = "0x1B2C0A0", Offset = "0x1B2AAA0", VA = "0x181B2C0A0", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
Mesh mesh = this.<RequestedMesh>k__BackingField;
|
||||
Mesh mesh2 = this.<ActiveMesh>k__BackingField;
|
||||
if (mesh != mesh2)
|
||||
{
|
||||
SafeDestroy.Asset(this.<RequestedMesh>k__BackingField);
|
||||
}
|
||||
SafeDestroy.Asset(this.<ActiveMesh>k__BackingField);
|
||||
NativeClusterMesh nativeClusterMesh = this.nativeMesh;
|
||||
int num = 0;
|
||||
this.<RequestedMesh>k__BackingField = num;
|
||||
this.<ActiveMesh>k__BackingField = num;
|
||||
nativeClusterMesh.Dispose();
|
||||
this.subdivideMeshData.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x06004D3A RID: 19770 RVA: 0x0011F3B8 File Offset: 0x0011D5B8
|
||||
[Token(Token = "0x6004D3A")]
|
||||
[Address(RVA = "0x1B2C290", Offset = "0x1B2AC90", VA = "0x181B2C290")]
|
||||
public ClusterInfo()
|
||||
{
|
||||
List<IClusterLODComponent> list = new List();
|
||||
this.components = list;
|
||||
NativeClusterMesh nativeClusterMesh = new NativeClusterMesh();
|
||||
this.nativeMesh = nativeClusterMesh;
|
||||
SubdivideMeshData subdivideMeshData = new SubdivideMeshData();
|
||||
this.subdivideMeshData = subdivideMeshData;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x0400392F RID: 14639
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400392F")]
|
||||
public Bounds bounds;
|
||||
|
||||
// Token: 0x04003930 RID: 14640
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4003930")]
|
||||
public List<IClusterLODComponent> components;
|
||||
|
||||
// Token: 0x04003933 RID: 14643
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4003933")]
|
||||
public Vector3 closestPos;
|
||||
|
||||
// Token: 0x04003934 RID: 14644
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x4C")]
|
||||
[Token(Token = "0x4003934")]
|
||||
public float closestDist;
|
||||
|
||||
// Token: 0x04003935 RID: 14645
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4003935")]
|
||||
public byte requestedLod;
|
||||
|
||||
// Token: 0x04003936 RID: 14646
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x4003936")]
|
||||
public Vector3 prevUpdatedEyePos;
|
||||
|
||||
// Token: 0x04003937 RID: 14647
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4003937")]
|
||||
public int numLOD0Verts;
|
||||
|
||||
// Token: 0x04003938 RID: 14648
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x64")]
|
||||
[Token(Token = "0x4003938")]
|
||||
public int numLOD1Verts;
|
||||
|
||||
// Token: 0x04003939 RID: 14649
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4003939")]
|
||||
public int numAdditionalVerts;
|
||||
|
||||
// Token: 0x0400393A RID: 14650
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400393A")]
|
||||
public NativeClusterMesh nativeMesh;
|
||||
|
||||
// Token: 0x0400393B RID: 14651
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x400393B")]
|
||||
public SubdivideMeshData subdivideMeshData;
|
||||
|
||||
// Token: 0x0400393C RID: 14652
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400393C")]
|
||||
public Transform root;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Jobs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C87 RID: 3207
|
||||
[Token(Token = "0x2000C87")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterMeshAssetCache : IDisposable
|
||||
{
|
||||
// Token: 0x17000D68 RID: 3432
|
||||
// (get) Token: 0x06004D3B RID: 19771 RVA: 0x0011F3F4 File Offset: 0x0011D5F4
|
||||
[Token(Token = "0x17000D68")]
|
||||
public NativeClusterMesh PrimitiveSrcMesh
|
||||
{
|
||||
[Token(Token = "0x6004D3B")]
|
||||
[Address(RVA = "0x1B313D0", Offset = "0x1B2FDD0", VA = "0x181B313D0")]
|
||||
get
|
||||
{
|
||||
NativeClusterMesh primitiveSrcMesh = this._primitiveSrcMesh;
|
||||
if (primitiveSrcMesh == 0)
|
||||
{
|
||||
NativeClusterMesh nativeClusterMesh = new NativeClusterMesh();
|
||||
this._primitiveSrcMesh = nativeClusterMesh;
|
||||
int num = 0;
|
||||
OAHBIDJKENF oahbidjkenf = EOKPFJPCGMK.MBFEPPCGJCB(num);
|
||||
int vertexCount = oahbidjkenf.<DJIGBAMBFKC>k__BackingField.vertexCount;
|
||||
Mesh <DJIGBAMBFKC>k__BackingField = oahbidjkenf.<DJIGBAMBFKC>k__BackingField;
|
||||
num += vertexCount;
|
||||
int num2 = 0;
|
||||
uint indexCount = <DJIGBAMBFKC>k__BackingField.GetIndexCount(num2);
|
||||
num += (int)indexCount;
|
||||
num++;
|
||||
NativeClusterMesh primitiveSrcMesh2 = this._primitiveSrcMesh;
|
||||
OAHBIDJKENF oahbidjkenf2 = EOKPFJPCGMK.MBFEPPCGJCB(num);
|
||||
NativeClusterMesh primitiveSrcMesh3 = this._primitiveSrcMesh;
|
||||
Mesh <DJIGBAMBFKC>k__BackingField2 = oahbidjkenf2.<DJIGBAMBFKC>k__BackingField;
|
||||
int num3 = 0;
|
||||
primitiveSrcMesh3.AppendMesh(<DJIGBAMBFKC>k__BackingField2, num3 != 0);
|
||||
num++;
|
||||
}
|
||||
return primitiveSrcMesh;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D3C RID: 19772 RVA: 0x0011F490 File Offset: 0x0011D690
|
||||
[Token(Token = "0x6004D3C")]
|
||||
[Address(RVA = "0x1B30A60", Offset = "0x1B2F460", VA = "0x181B30A60", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
this.createMeshFromClusterJob.Dispose();
|
||||
NativeClusterMesh primitiveSrcMesh = this._primitiveSrcMesh;
|
||||
if (primitiveSrcMesh != 0)
|
||||
{
|
||||
primitiveSrcMesh.Dispose();
|
||||
this._primitiveSrcMesh = (ulong)0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D3D RID: 19773 RVA: 0x0011F4C8 File Offset: 0x0011D6C8
|
||||
[Token(Token = "0x6004D3D")]
|
||||
[Address(RVA = "0x1B309E0", Offset = "0x1B2F3E0", VA = "0x181B309E0")]
|
||||
public void Clear()
|
||||
{
|
||||
CreateMeshFromClusterJob createMeshFromClusterJob = this.createMeshFromClusterJob;
|
||||
JobHandle <jobHandle>k__BackingField = createMeshFromClusterJob.<jobHandle>k__BackingField;
|
||||
createMeshFromClusterJob.<cluster>k__BackingField = (ulong)0L;
|
||||
this.createQueue.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x06004D3E RID: 19774 RVA: 0x0011F500 File Offset: 0x0011D700
|
||||
[Token(Token = "0x6004D3E")]
|
||||
[Address(RVA = "0x1B30940", Offset = "0x1B2F340", VA = "0x181B30940")]
|
||||
public void Add(ClusterMesh.ClusterInfo cluster, Transform root)
|
||||
{
|
||||
List<IClusterLODComponent> components = cluster.components;
|
||||
cluster.root = root;
|
||||
if (!this.createQueue.Contains(cluster))
|
||||
{
|
||||
this.createQueue.Enqueue(cluster);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D3F RID: 19775 RVA: 0x0011F53C File Offset: 0x0011D73C
|
||||
[Token(Token = "0x6004D3F")]
|
||||
[Address(RVA = "0x1B30F00", Offset = "0x1B2F900", VA = "0x181B30F00")]
|
||||
public void Remove(ClusterMesh.ClusterInfo cluster)
|
||||
{
|
||||
if (this.createQueue.Contains(cluster))
|
||||
{
|
||||
Queue<ClusterMesh.ClusterInfo> queue = new Queue();
|
||||
ClusterMesh.ClusterInfo clusterInfo = this.createQueue.Dequeue();
|
||||
if (clusterInfo != cluster)
|
||||
{
|
||||
queue.Enqueue(clusterInfo);
|
||||
}
|
||||
Queue<ClusterMesh.ClusterInfo> queue2 = this.createQueue;
|
||||
this.createQueue = queue;
|
||||
}
|
||||
CreateMeshFromClusterJob createMeshFromClusterJob = this.createMeshFromClusterJob;
|
||||
ClusterMesh.ClusterInfo <cluster>k__BackingField = createMeshFromClusterJob.<cluster>k__BackingField;
|
||||
JobHandle <jobHandle>k__BackingField = createMeshFromClusterJob.<jobHandle>k__BackingField;
|
||||
createMeshFromClusterJob.<cluster>k__BackingField = (ulong)0L;
|
||||
if (this.activeClusters.Contains(cluster))
|
||||
{
|
||||
bool flag = this.activeClusters.Remove(cluster);
|
||||
int numLOD0Verts = cluster.numLOD0Verts;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D40 RID: 19776 RVA: 0x0011F5D0 File Offset: 0x0011D7D0
|
||||
[Token(Token = "0x6004D40")]
|
||||
[Address(RVA = "0x1B30B00", Offset = "0x1B2F500", VA = "0x181B30B00")]
|
||||
private ClusterMesh.ClusterInfo GetWorstActiveCluster()
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
List<ClusterMesh.ClusterInfo> list = this.activeClusters;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D41 RID: 19777 RVA: 0x0011F600 File Offset: 0x0011D800
|
||||
[Token(Token = "0x6004D41")]
|
||||
[Address(RVA = "0x1B30DD0", Offset = "0x1B2F7D0", VA = "0x181B30DD0")]
|
||||
private bool IsClusterActive(ClusterMesh.ClusterInfo cluster)
|
||||
{
|
||||
return this.activeClusters.Contains(cluster);
|
||||
}
|
||||
|
||||
// Token: 0x06004D42 RID: 19778 RVA: 0x0011F620 File Offset: 0x0011D820
|
||||
[Token(Token = "0x6004D42")]
|
||||
[Address(RVA = "0x1B30E70", Offset = "0x1B2F870", VA = "0x181B30E70")]
|
||||
private bool RemoveActiveCluster(ClusterMesh.ClusterInfo cluster)
|
||||
{
|
||||
bool flag = this.activeClusters.Contains(cluster);
|
||||
if (!flag)
|
||||
{
|
||||
return flag;
|
||||
}
|
||||
bool flag2 = this.activeClusters.Remove(cluster);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D43 RID: 19779 RVA: 0x0011F654 File Offset: 0x0011D854
|
||||
[Token(Token = "0x6004D43")]
|
||||
[Address(RVA = "0x1B308E0", Offset = "0x1B2F2E0", VA = "0x181B308E0")]
|
||||
private void AddActiveCluster(ClusterMesh.ClusterInfo cluster)
|
||||
{
|
||||
this.activeClusters.Add(cluster);
|
||||
int numLOD0Verts = cluster.numLOD0Verts;
|
||||
}
|
||||
|
||||
// Token: 0x06004D44 RID: 19780 RVA: 0x0011F67C File Offset: 0x0011D87C
|
||||
[Token(Token = "0x6004D44")]
|
||||
[Address(RVA = "0x1B30C60", Offset = "0x1B2F660", VA = "0x181B30C60")]
|
||||
private void InitPrimitiveSrcMesh()
|
||||
{
|
||||
NativeClusterMesh nativeClusterMesh = new NativeClusterMesh();
|
||||
this._primitiveSrcMesh = nativeClusterMesh;
|
||||
int num = 0;
|
||||
OAHBIDJKENF oahbidjkenf = EOKPFJPCGMK.MBFEPPCGJCB(num);
|
||||
int vertexCount = oahbidjkenf.<DJIGBAMBFKC>k__BackingField.vertexCount;
|
||||
Mesh <DJIGBAMBFKC>k__BackingField = oahbidjkenf.<DJIGBAMBFKC>k__BackingField;
|
||||
num += vertexCount;
|
||||
int num2 = 0;
|
||||
uint indexCount = <DJIGBAMBFKC>k__BackingField.GetIndexCount(num2);
|
||||
num += (int)indexCount;
|
||||
num++;
|
||||
NativeClusterMesh primitiveSrcMesh = this._primitiveSrcMesh;
|
||||
OAHBIDJKENF oahbidjkenf2 = EOKPFJPCGMK.MBFEPPCGJCB(num);
|
||||
NativeClusterMesh primitiveSrcMesh2 = this._primitiveSrcMesh;
|
||||
Mesh <DJIGBAMBFKC>k__BackingField2 = oahbidjkenf2.<DJIGBAMBFKC>k__BackingField;
|
||||
int num3 = 0;
|
||||
primitiveSrcMesh2.AppendMesh(<DJIGBAMBFKC>k__BackingField2, num3 != 0);
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x06004D45 RID: 19781 RVA: 0x0011F708 File Offset: 0x0011D908
|
||||
[Token(Token = "0x6004D45")]
|
||||
[Address(RVA = "0x1B30E30", Offset = "0x1B2F830", VA = "0x181B30E30")]
|
||||
public bool IsProcessing(ClusterMesh.ClusterInfo cluster)
|
||||
{
|
||||
ClusterMesh.ClusterInfo <cluster>k__BackingField = this.createMeshFromClusterJob.<cluster>k__BackingField;
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x06004D46 RID: 19782 RVA: 0x0011F72C File Offset: 0x0011D92C
|
||||
[Token(Token = "0x6004D46")]
|
||||
[Address(RVA = "0x1B31090", Offset = "0x1B2FA90", VA = "0x181B31090")]
|
||||
public bool Update()
|
||||
{
|
||||
ClusterMesh.ClusterInfo clusterInfo;
|
||||
ClusterMesh.ClusterInfo worstActiveCluster;
|
||||
do
|
||||
{
|
||||
CreateMeshFromClusterJob createMeshFromClusterJob = this.createMeshFromClusterJob;
|
||||
if (createMeshFromClusterJob.<cluster>k__BackingField > (ulong)0L)
|
||||
{
|
||||
if (!JobHandle.ScheduleBatchedJobsAndIsCompleted(createMeshFromClusterJob.<jobHandle>k__BackingField))
|
||||
{
|
||||
}
|
||||
ClusterMesh.ClusterInfo <cluster>k__BackingField = this.createMeshFromClusterJob.<cluster>k__BackingField;
|
||||
bool flag = this.RemoveActiveCluster(<cluster>k__BackingField);
|
||||
this.createMeshFromClusterJob.CreateMesh();
|
||||
this.activeClusters.Add(<cluster>k__BackingField);
|
||||
}
|
||||
clusterInfo = this.createQueue.Dequeue();
|
||||
while (clusterInfo == 0)
|
||||
{
|
||||
}
|
||||
int num = this.numActiveVerts;
|
||||
int maxDynamicNearVerts = ClusterLODManager._instance.<Config>k__BackingField.maxDynamicNearVerts;
|
||||
if (num <= maxDynamicNearVerts)
|
||||
{
|
||||
goto IL_B2;
|
||||
}
|
||||
worstActiveCluster = this.GetWorstActiveCluster();
|
||||
if (worstActiveCluster == 0)
|
||||
{
|
||||
goto IL_B2;
|
||||
}
|
||||
}
|
||||
while (clusterInfo.closestDist > worstActiveCluster.closestDist);
|
||||
bool flag2 = this.RemoveActiveCluster(worstActiveCluster);
|
||||
worstActiveCluster.RequestRemoveMesh();
|
||||
IL_B2:
|
||||
CreateMeshFromClusterJob createMeshFromClusterJob2 = this.createMeshFromClusterJob;
|
||||
if (createMeshFromClusterJob2.<cluster>k__BackingField <= (ulong)0L)
|
||||
{
|
||||
List<IClusterLODComponent> components = clusterInfo.components;
|
||||
Transform root = clusterInfo.root;
|
||||
int num2 = 0;
|
||||
createMeshFromClusterJob2.Init(clusterInfo, root, num2);
|
||||
JobHandle.ScheduleBatchedJobs();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D47 RID: 19783 RVA: 0x0011F830 File Offset: 0x0011DA30
|
||||
[Token(Token = "0x6004D47")]
|
||||
[Address(RVA = "0x1B30AA0", Offset = "0x1B2F4A0", VA = "0x181B30AA0")]
|
||||
private ClusterMesh.ClusterInfo GetClusterToCreate()
|
||||
{
|
||||
return this.createQueue.Dequeue();
|
||||
}
|
||||
|
||||
// Token: 0x06004D48 RID: 19784 RVA: 0x0011F850 File Offset: 0x0011DA50
|
||||
[Token(Token = "0x6004D48")]
|
||||
[Address(RVA = "0x1B31330", Offset = "0x1B2FD30", VA = "0x181B31330")]
|
||||
public ClusterMeshAssetCache()
|
||||
{
|
||||
Queue<ClusterMesh.ClusterInfo> queue = new Queue();
|
||||
this.createQueue = queue;
|
||||
CreateMeshFromClusterJob createMeshFromClusterJob = new CreateMeshFromClusterJob();
|
||||
this.createMeshFromClusterJob = createMeshFromClusterJob;
|
||||
List<ClusterMesh.ClusterInfo> list = new List();
|
||||
this.activeClusters = list;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x0400393D RID: 14653
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400393D")]
|
||||
private Queue<ClusterMesh.ClusterInfo> createQueue;
|
||||
|
||||
// Token: 0x0400393E RID: 14654
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400393E")]
|
||||
private CreateMeshFromClusterJob createMeshFromClusterJob;
|
||||
|
||||
// Token: 0x0400393F RID: 14655
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400393F")]
|
||||
private readonly List<ClusterMesh.ClusterInfo> activeClusters;
|
||||
|
||||
// Token: 0x04003940 RID: 14656
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4003940")]
|
||||
private int numActiveVerts;
|
||||
|
||||
// Token: 0x04003941 RID: 14657
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4003941")]
|
||||
private NativeClusterMesh _primitiveSrcMesh;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C88 RID: 3208
|
||||
[Token(Token = "0x2000C88")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterMeshAssetEditorDebug : MonoBehaviour
|
||||
{
|
||||
// Token: 0x06004D49 RID: 19785 RVA: 0x0011F88C File Offset: 0x0011DA8C
|
||||
[Token(Token = "0x6004D49")]
|
||||
[Address(RVA = "0x3C1210", Offset = "0x3BFC10", VA = "0x1803C1210")]
|
||||
public ClusterMeshAssetEditorDebug()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C91 RID: 3217
|
||||
[Token(Token = "0x2000C91")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterMeshGenerator
|
||||
{
|
||||
// Token: 0x06004D68 RID: 19816 RVA: 0x00120650 File Offset: 0x0011E850
|
||||
[Token(Token = "0x6004D68")]
|
||||
[Address(RVA = "0x1B31A30", Offset = "0x1B30430", VA = "0x181B31A30")]
|
||||
public ClusterMeshGenerator(int minNumVerts, int maxNumVerts, float maxRadius)
|
||||
{
|
||||
this.minNumVerts = minNumVerts;
|
||||
this.maxNumVerts = maxNumVerts;
|
||||
this.maxDiameterSq = maxRadius;
|
||||
}
|
||||
|
||||
// Token: 0x17000D6E RID: 3438
|
||||
// (get) Token: 0x06004D69 RID: 19817 RVA: 0x00120678 File Offset: 0x0011E878
|
||||
// (set) Token: 0x06004D6A RID: 19818 RVA: 0x0012068C File Offset: 0x0011E88C
|
||||
[Token(Token = "0x17000D6E")]
|
||||
public List<ClusterMesh> Meshes
|
||||
{
|
||||
[Token(Token = "0x6004D69")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
||||
get;
|
||||
[Token(Token = "0x6004D6A")]
|
||||
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x06004D6B RID: 19819 RVA: 0x001206A0 File Offset: 0x0011E8A0
|
||||
[Token(Token = "0x6004D6B")]
|
||||
[Address(RVA = "0x1B316E0", Offset = "0x1B300E0", VA = "0x181B316E0")]
|
||||
public void CreateClusterMeshInstances(ClusterTree tree)
|
||||
{
|
||||
List<ClusterMesh> list = new List();
|
||||
this.<Meshes>k__BackingField = list;
|
||||
ClusterNode <Root>k__BackingField = tree.<Root>k__BackingField;
|
||||
int num = this.UpdateVertexCount(<Root>k__BackingField);
|
||||
ClusterNode <Root>k__BackingField2 = tree.<Root>k__BackingField;
|
||||
this.CreateClusterMeshInstances(<Root>k__BackingField2);
|
||||
}
|
||||
|
||||
// Token: 0x06004D6C RID: 19820 RVA: 0x001206E0 File Offset: 0x0011E8E0
|
||||
[Token(Token = "0x6004D6C")]
|
||||
[Address(RVA = "0x1B31990", Offset = "0x1B30390", VA = "0x181B31990")]
|
||||
private int UpdateVertexCount(ClusterNode node)
|
||||
{
|
||||
if (node != 0)
|
||||
{
|
||||
List<IClusterLODComponent> components = node.components;
|
||||
if (components != 0)
|
||||
{
|
||||
int vertexCount = ClusterUtil.GetVertexCount(components, 1);
|
||||
}
|
||||
int num = 0;
|
||||
node.vertexCount = num;
|
||||
ClusterNode child = node.child1;
|
||||
int num2 = this.UpdateVertexCount(child);
|
||||
num += num2;
|
||||
node.vertexCount = num;
|
||||
ClusterNode child2 = node.child2;
|
||||
int num3 = this.UpdateVertexCount(child2);
|
||||
num3 += num;
|
||||
node.vertexCount = num3;
|
||||
return num3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x06004D6D RID: 19821 RVA: 0x00120750 File Offset: 0x0011E950
|
||||
[Token(Token = "0x6004D6D")]
|
||||
[Address(RVA = "0x1B31770", Offset = "0x1B30170", VA = "0x181B31770")]
|
||||
private void CreateClusterMeshInstances(ClusterNode node)
|
||||
{
|
||||
int num = 0;
|
||||
if (node != 0)
|
||||
{
|
||||
if (node.child1 != num)
|
||||
{
|
||||
int num2 = this.maxNumVerts;
|
||||
Vector3 vector;
|
||||
float z = vector.z;
|
||||
int num3 = this.minNumVerts;
|
||||
if (node.vertexCount > num3)
|
||||
{
|
||||
ClusterNode child = node.child1;
|
||||
this.CreateClusterMeshInstances(child);
|
||||
ClusterNode child2 = node.child2;
|
||||
this.CreateClusterMeshInstances(child2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ClusterMesh clusterMesh = new ClusterMesh();
|
||||
List<ClusterMesh.ClusterInfo> list = new List();
|
||||
clusterMesh.Clusters = list;
|
||||
ClusterMeshUpdateJobData clusterMeshUpdateJobData = new ClusterMeshUpdateJobData();
|
||||
clusterMesh.updateData = clusterMeshUpdateJobData;
|
||||
Bounds bounds = node.bounds;
|
||||
clusterMesh.bounds = bounds;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D6E RID: 19822 RVA: 0x001207EC File Offset: 0x0011E9EC
|
||||
[Token(Token = "0x6004D6E")]
|
||||
[Address(RVA = "0x1B31550", Offset = "0x1B2FF50", VA = "0x181B31550")]
|
||||
private void AssignNodesToMesh(ClusterNode node, ClusterMesh newClusterMesh)
|
||||
{
|
||||
if (node != 0)
|
||||
{
|
||||
if (node.components != 0)
|
||||
{
|
||||
ClusterMesh.ClusterInfo clusterInfo = new ClusterMesh.ClusterInfo();
|
||||
List<IClusterLODComponent> list = new List();
|
||||
clusterInfo.components = list;
|
||||
NativeClusterMesh nativeClusterMesh = new NativeClusterMesh();
|
||||
clusterInfo.nativeMesh = nativeClusterMesh;
|
||||
SubdivideMeshData subdivideMeshData = new SubdivideMeshData();
|
||||
clusterInfo.subdivideMeshData = subdivideMeshData;
|
||||
List<IClusterLODComponent> components = node.components;
|
||||
clusterInfo.components = components;
|
||||
Bounds bounds = node.bounds;
|
||||
clusterInfo.bounds = bounds;
|
||||
clusterInfo.requestedLod = (byte)((ulong)1L);
|
||||
newClusterMesh.Clusters.Add(clusterInfo);
|
||||
}
|
||||
ClusterNode child = node.child1;
|
||||
this.AssignNodesToMesh(child, newClusterMesh);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400397F RID: 14719
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400397F")]
|
||||
private int minNumVerts;
|
||||
|
||||
// Token: 0x04003980 RID: 14720
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x4003980")]
|
||||
private int maxNumVerts;
|
||||
|
||||
// Token: 0x04003981 RID: 14721
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4003981")]
|
||||
private float maxDiameterSq;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using RecRoom.Core.Rendering;
|
||||
using Unity.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C92 RID: 3218
|
||||
[Token(Token = "0x2000C92")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterMeshRenderer : MonoBehaviour
|
||||
{
|
||||
// Token: 0x06004D6F RID: 19823 RVA: 0x00120880 File Offset: 0x0011EA80
|
||||
[Token(Token = "0x6004D6F")]
|
||||
[Address(RVA = "0x1B31A80", Offset = "0x1B30480", VA = "0x181B31A80")]
|
||||
public static ClusterMeshRenderer Create(ClusterMesh mesh, ClusterMeshRenderer clusterMeshRendererPrefab, MeshFilter clusterPrefab, Transform root, bool dynamic)
|
||||
{
|
||||
ClusterMeshRenderer clusterMeshRenderer = global::UnityEngine.Object.Instantiate<ClusterMeshRenderer>(clusterMeshRendererPrefab, root);
|
||||
MeshRenderer component = clusterMeshRenderer.GetComponent<MeshRenderer>();
|
||||
Material meshMaterial = ClusterLODManager._instance.GetMeshMaterial();
|
||||
component.SetMaterial(meshMaterial);
|
||||
clusterMeshRenderer.<Dynamic>k__BackingField = false;
|
||||
clusterMeshRenderer.Init(mesh, clusterPrefab);
|
||||
return clusterMeshRenderer;
|
||||
}
|
||||
|
||||
// Token: 0x06004D70 RID: 19824 RVA: 0x001208C4 File Offset: 0x0011EAC4
|
||||
[Token(Token = "0x6004D70")]
|
||||
[Address(RVA = "0x1B32090", Offset = "0x1B30A90", VA = "0x181B32090")]
|
||||
private void OnDestroy()
|
||||
{
|
||||
this.<Clusters>k__BackingField.Clear();
|
||||
this.<Mesh>k__BackingField.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x17000D6F RID: 3439
|
||||
// (get) Token: 0x06004D71 RID: 19825 RVA: 0x001208F0 File Offset: 0x0011EAF0
|
||||
// (set) Token: 0x06004D72 RID: 19826 RVA: 0x00120904 File Offset: 0x0011EB04
|
||||
[Token(Token = "0x17000D6F")]
|
||||
public List<MeshFilter> Clusters
|
||||
{
|
||||
[Token(Token = "0x6004D71")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get;
|
||||
[Token(Token = "0x6004D72")]
|
||||
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x17000D70 RID: 3440
|
||||
// (get) Token: 0x06004D73 RID: 19827 RVA: 0x00120918 File Offset: 0x0011EB18
|
||||
// (set) Token: 0x06004D74 RID: 19828 RVA: 0x0012092C File Offset: 0x0011EB2C
|
||||
[Token(Token = "0x17000D70")]
|
||||
public ClusterMesh Mesh
|
||||
{
|
||||
[Token(Token = "0x6004D73")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
||||
get;
|
||||
[Token(Token = "0x6004D74")]
|
||||
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x17000D71 RID: 3441
|
||||
// (get) Token: 0x06004D75 RID: 19829 RVA: 0x00120940 File Offset: 0x0011EB40
|
||||
// (set) Token: 0x06004D76 RID: 19830 RVA: 0x00120954 File Offset: 0x0011EB54
|
||||
[Token(Token = "0x17000D71")]
|
||||
public bool Dynamic
|
||||
{
|
||||
[Token(Token = "0x6004D75")]
|
||||
[Address(RVA = "0x651230", Offset = "0x64FC30", VA = "0x180651230")]
|
||||
get;
|
||||
[Token(Token = "0x6004D76")]
|
||||
[Address(RVA = "0x6C60C0", Offset = "0x6C4AC0", VA = "0x1806C60C0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x06004D77 RID: 19831 RVA: 0x00120968 File Offset: 0x0011EB68
|
||||
[Token(Token = "0x6004D77")]
|
||||
[Address(RVA = "0x1B31D90", Offset = "0x1B30790", VA = "0x181B31D90")]
|
||||
public void Init(ClusterMesh mesh, MeshFilter clusterPrefab)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
mesh.owner = this;
|
||||
this.<Mesh>k__BackingField = mesh;
|
||||
List<MeshFilter> list = new List(mesh.Clusters._size);
|
||||
this.<Clusters>k__BackingField = list;
|
||||
List<ClusterMesh.ClusterInfo> clusters = mesh.Clusters;
|
||||
if (list.GetEnumerator() != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
Transform transform = base.transform;
|
||||
MeshFilter meshFilter = global::UnityEngine.Object.Instantiate<MeshFilter>(clusterPrefab, transform);
|
||||
MeshRenderer component = meshFilter.GetComponent<MeshRenderer>();
|
||||
Material[] sharedMaterialArray = meshFilter.GetComponent<MeshRenderer>().GetSharedMaterialArray();
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D78 RID: 19832 RVA: 0x00120A40 File Offset: 0x0011EC40
|
||||
[Token(Token = "0x6004D78")]
|
||||
[Address(RVA = "0x1B31BE0", Offset = "0x1B305E0", VA = "0x181B31BE0")]
|
||||
public void GenerateLOD()
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
ClusterMesh clusterMesh = this.<Mesh>k__BackingField;
|
||||
Transform transform = base.transform;
|
||||
bool flag = this.<Dynamic>k__BackingField;
|
||||
clusterMesh.GenerateLODMesh(transform, flag);
|
||||
MeshFilter component = base.GetComponent<MeshFilter>();
|
||||
Mesh mesh = this.<Mesh>k__BackingField.<Mesh>k__BackingField;
|
||||
component.sharedMesh = mesh;
|
||||
List<MeshFilter> list = this.<Clusters>k__BackingField;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
GameObject gameObject = component.gameObject;
|
||||
int num2 = 0;
|
||||
gameObject.SetActive(num2 != 0);
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x06004D79 RID: 19833 RVA: 0x00120AC0 File Offset: 0x0011ECC0
|
||||
[Token(Token = "0x6004D79")]
|
||||
[Address(RVA = "0x1B32460", Offset = "0x1B30E60", VA = "0x181B32460")]
|
||||
public void UpdateClusterDistances(Vector3 pos)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if ((this.<Dynamic>k__BackingField ? 1 : 0) != num)
|
||||
{
|
||||
Transform transform = base.transform;
|
||||
Vector3 vector;
|
||||
float z = vector.z;
|
||||
pos.z = z;
|
||||
}
|
||||
List<ClusterMesh.ClusterInfo> clusters = this.<Mesh>k__BackingField.Clusters;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
float z2 = pos.z;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x06004D7A RID: 19834 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D7A")]
|
||||
[Address(RVA = "0x1B326B0", Offset = "0x1B310B0", VA = "0x181B326B0")]
|
||||
public bool UpdateVisibility()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D7B RID: 19835 RVA: 0x00120B18 File Offset: 0x0011ED18
|
||||
[Token(Token = "0x6004D7B")]
|
||||
[Address(RVA = "0x1B32110", Offset = "0x1B30B10", VA = "0x181B32110")]
|
||||
public void RenderOutline(OutlineRendererEffect.HLEDHCIGMPJ outlineType)
|
||||
{
|
||||
OEIHLPKBJKH nextOutlineRenderHandle = OutlineRendererEffect.GetNextOutlineRenderHandle();
|
||||
List<MeshFilter> list = this.<Clusters>k__BackingField;
|
||||
int num = 0;
|
||||
NativeArray<int> componentLod = this.<Mesh>k__BackingField.updateData.componentLod;
|
||||
GameObject gameObject;
|
||||
Renderer component = gameObject.GetComponent<Renderer>();
|
||||
num++;
|
||||
num += 4;
|
||||
}
|
||||
|
||||
// Token: 0x06004D7C RID: 19836 RVA: 0x00120B60 File Offset: 0x0011ED60
|
||||
[Token(Token = "0x6004D7C")]
|
||||
[Address(RVA = "0x1B32280", Offset = "0x1B30C80", VA = "0x181B32280")]
|
||||
public void SetupTagAndLayer(string tag, int layer)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
base.gameObject.layer = layer;
|
||||
base.gameObject.tag = tag;
|
||||
List<MeshFilter> list = this.<Clusters>k__BackingField;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
base.gameObject.layer = layer;
|
||||
base.gameObject.tag = tag;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x06004D7D RID: 19837 RVA: 0x00120BC4 File Offset: 0x0011EDC4
|
||||
[Token(Token = "0x6004D7D")]
|
||||
[Address(RVA = "0x1B320F0", Offset = "0x1B30AF0", VA = "0x181B320F0")]
|
||||
public bool Remove(IClusterLODComponent component)
|
||||
{
|
||||
return this.<Mesh>k__BackingField.Remove(component);
|
||||
}
|
||||
|
||||
// Token: 0x06004D7E RID: 19838 RVA: 0x00120BE4 File Offset: 0x0011EDE4
|
||||
[Token(Token = "0x6004D7E")]
|
||||
[Address(RVA = "0x3C1210", Offset = "0x3BFC10", VA = "0x1803C1210")]
|
||||
public ClusterMeshRenderer()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C94 RID: 3220
|
||||
[Token(Token = "0x2000C94")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0)]
|
||||
public struct ClusterMeshUpdateJob : IJob
|
||||
{
|
||||
// Token: 0x06004D8A RID: 19850 RVA: 0x00120EC0 File Offset: 0x0011F0C0
|
||||
[Token(Token = "0x6004D8A")]
|
||||
[Address(RVA = "0x23E8F0", Offset = "0x23DCF0", VA = "0x18023E8F0")]
|
||||
public ClusterMeshUpdateJob(ClusterMeshUpdateJobData jobData, Vector3 eyePos, bool dynamicCluster, float faceFactor, float meshScale, float distFactor)
|
||||
{
|
||||
float z = eyePos.z;
|
||||
}
|
||||
|
||||
// Token: 0x06004D8B RID: 19851 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D8B")]
|
||||
[Address(RVA = "0x23E8E0", Offset = "0x23DCE0", VA = "0x18023E8E0", Slot = "4")]
|
||||
public void Execute()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x04003991 RID: 14737
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4003991")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> verts;
|
||||
|
||||
// Token: 0x04003992 RID: 14738
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003992")]
|
||||
[ReadOnly]
|
||||
public NativeList<int> origIndices;
|
||||
|
||||
// Token: 0x04003993 RID: 14739
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003993")]
|
||||
[ReadOnly]
|
||||
private NativeList<MeshComponentInfo> clusterInfo;
|
||||
|
||||
// Token: 0x04003994 RID: 14740
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4003994")]
|
||||
[ReadOnly]
|
||||
private NativeArray<int> componentLod;
|
||||
|
||||
// Token: 0x04003995 RID: 14741
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4003995")]
|
||||
[ReadOnly]
|
||||
private float3 eyePos;
|
||||
|
||||
// Token: 0x04003996 RID: 14742
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4003996")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float3> triNormals;
|
||||
|
||||
// Token: 0x04003997 RID: 14743
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4003997")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float> triSizes;
|
||||
|
||||
// Token: 0x04003998 RID: 14744
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4003998")]
|
||||
[ReadOnly]
|
||||
private bool dynamicCluster;
|
||||
|
||||
// Token: 0x04003999 RID: 14745
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x74")]
|
||||
[Token(Token = "0x4003999")]
|
||||
[ReadOnly]
|
||||
private float faceFactor;
|
||||
|
||||
// Token: 0x0400399A RID: 14746
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x400399A")]
|
||||
[ReadOnly]
|
||||
private float meshScale;
|
||||
|
||||
// Token: 0x0400399B RID: 14747
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x7C")]
|
||||
[Token(Token = "0x400399B")]
|
||||
[ReadOnly]
|
||||
private float distFactor;
|
||||
|
||||
// Token: 0x0400399C RID: 14748
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400399C")]
|
||||
private NativeList<int> indices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C93 RID: 3219
|
||||
[Token(Token = "0x2000C93")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterMeshUpdateJobData : IDisposable
|
||||
{
|
||||
// Token: 0x17000D72 RID: 3442
|
||||
// (get) Token: 0x06004D7F RID: 19839 RVA: 0x00120BF8 File Offset: 0x0011EDF8
|
||||
// (set) Token: 0x06004D80 RID: 19840 RVA: 0x00120C0C File Offset: 0x0011EE0C
|
||||
[Token(Token = "0x17000D72")]
|
||||
public bool IsActive
|
||||
{
|
||||
[Token(Token = "0x6004D7F")]
|
||||
[Address(RVA = "0x7D79F0", Offset = "0x7D63F0", VA = "0x1807D79F0")]
|
||||
get;
|
||||
[Token(Token = "0x6004D80")]
|
||||
[Address(RVA = "0x7D7B00", Offset = "0x7D6500", VA = "0x1807D7B00")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x06004D81 RID: 19841 RVA: 0x00120C20 File Offset: 0x0011EE20
|
||||
[Token(Token = "0x6004D81")]
|
||||
[Address(RVA = "0x1B33620", Offset = "0x1B32020", VA = "0x181B33620")]
|
||||
public void Init(NativeClusterMesh srcMesh, float scale)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D82 RID: 19842 RVA: 0x00120CBC File Offset: 0x0011EEBC
|
||||
[Token(Token = "0x6004D82")]
|
||||
[Address(RVA = "0x1B32DE0", Offset = "0x1B317E0", VA = "0x181B32DE0")]
|
||||
public void CreateUpdateJob(Transform root, bool dynamicCluster)
|
||||
{
|
||||
float z = ClusterLODManager._instance.<EyePos>k__BackingField.z;
|
||||
Vector3 vector;
|
||||
float z2 = vector.z;
|
||||
ClusterLODConfig <Config>k__BackingField = ClusterLODManager._instance.<Config>k__BackingField;
|
||||
float backfaceCullingThreshold = <Config>k__BackingField.backfaceCullingThreshold;
|
||||
float triangleCullingDistFactor = <Config>k__BackingField.triangleCullingDistFactor;
|
||||
JobHandle.ScheduleBatchedJobs();
|
||||
this.<IsActive>k__BackingField = true;
|
||||
}
|
||||
|
||||
// Token: 0x06004D83 RID: 19843 RVA: 0x00120D14 File Offset: 0x0011EF14
|
||||
[Token(Token = "0x6004D83")]
|
||||
[Address(RVA = "0x1B33170", Offset = "0x1B31B70", VA = "0x181B33170")]
|
||||
private unsafe static void FastCopyArray(NativeArray<int> from, int[] to)
|
||||
{
|
||||
if (to == 0 || to.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<int>();
|
||||
int num3 = from.m_Length * num2;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num3);
|
||||
}
|
||||
|
||||
// Token: 0x06004D84 RID: 19844 RVA: 0x00120D48 File Offset: 0x0011EF48
|
||||
[Token(Token = "0x6004D84")]
|
||||
[Address(RVA = "0x1B333D0", Offset = "0x1B31DD0", VA = "0x181B333D0")]
|
||||
private static List<int> GetIntList(NativeArray<int> from)
|
||||
{
|
||||
int[] array = ClusterMeshUpdateJobData.tempIntArray;
|
||||
int length = from.m_Length;
|
||||
if (array.Length < length)
|
||||
{
|
||||
ClusterMeshUpdateJobData.tempIntArray = new int[length];
|
||||
}
|
||||
int[] array2 = ClusterMeshUpdateJobData.tempIntArray;
|
||||
if (array2 == 0 || array2.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = UnsafeUtility.SizeOf<int>();
|
||||
ClusterMeshUpdateJobData.tempIntList.Clear();
|
||||
List<int> list = ClusterMeshUpdateJobData.tempIntList;
|
||||
return ClusterMeshUpdateJobData.tempIntList;
|
||||
}
|
||||
|
||||
// Token: 0x06004D85 RID: 19845 RVA: 0x00120DB4 File Offset: 0x0011EFB4
|
||||
[Token(Token = "0x6004D85")]
|
||||
[Address(RVA = "0x1B33210", Offset = "0x1B31C10", VA = "0x181B33210")]
|
||||
public void FinalizeUpdate(ClusterMesh owner, bool setOrigIndices)
|
||||
{
|
||||
this.<IsActive>k__BackingField = false;
|
||||
if (owner != 0)
|
||||
{
|
||||
Mesh <Mesh>k__BackingField = owner.<Mesh>k__BackingField;
|
||||
int num = 0;
|
||||
if (!(<Mesh>k__BackingField == num))
|
||||
{
|
||||
owner.<Mesh>k__BackingField.subMeshCount = 2;
|
||||
NativeList<int> nativeList = this.indices;
|
||||
Mesh <Mesh>k__BackingField2 = owner.<Mesh>k__BackingField;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
List<int> list;
|
||||
<Mesh>k__BackingField2.SetTriangles(list, num3, num2 != 0);
|
||||
if (setOrigIndices)
|
||||
{
|
||||
NativeList<int> nativeList2 = this.origIndices;
|
||||
Mesh <Mesh>k__BackingField3 = owner.<Mesh>k__BackingField;
|
||||
int num4 = 0;
|
||||
List<int> list2;
|
||||
<Mesh>k__BackingField3.SetTriangles(list2, 1, num4 != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D86 RID: 19846 RVA: 0x00120E3C File Offset: 0x0011F03C
|
||||
[Token(Token = "0x6004D86")]
|
||||
[Address(RVA = "0x1B330A0", Offset = "0x1B31AA0", VA = "0x181B330A0", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
throw new MissingMethodException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D87 RID: 19847 RVA: 0x00120E74 File Offset: 0x0011F074
|
||||
[Token(Token = "0x6004D87")]
|
||||
[Address(RVA = "0x1B32DB0", Offset = "0x1B317B0", VA = "0x181B32DB0")]
|
||||
public void Clear()
|
||||
{
|
||||
this.<IsActive>k__BackingField = false;
|
||||
}
|
||||
|
||||
// Token: 0x06004D88 RID: 19848 RVA: 0x00120E88 File Offset: 0x0011F088
|
||||
[Token(Token = "0x6004D88")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public ClusterMeshUpdateJobData()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04003986 RID: 14726
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003986")]
|
||||
public NativeList<float3> verts;
|
||||
|
||||
// Token: 0x04003987 RID: 14727
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003987")]
|
||||
public NativeList<int> origIndices;
|
||||
|
||||
// Token: 0x04003988 RID: 14728
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4003988")]
|
||||
public NativeList<int> indices;
|
||||
|
||||
// Token: 0x04003989 RID: 14729
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4003989")]
|
||||
public NativeList<MeshComponentInfo> componentInfo;
|
||||
|
||||
// Token: 0x0400398A RID: 14730
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400398A")]
|
||||
public NativeArray<int> componentLod;
|
||||
|
||||
// Token: 0x0400398B RID: 14731
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400398B")]
|
||||
public NativeArray<float3> triNormals;
|
||||
|
||||
// Token: 0x0400398C RID: 14732
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400398C")]
|
||||
public NativeArray<float> triSizes;
|
||||
|
||||
// Token: 0x0400398D RID: 14733
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400398D")]
|
||||
public JobHandle jobHandle;
|
||||
|
||||
// Token: 0x0400398F RID: 14735
|
||||
[Token(Token = "0x400398F")]
|
||||
private static int[] tempIntArray = new int[1];
|
||||
|
||||
// Token: 0x04003990 RID: 14736
|
||||
[Token(Token = "0x4003990")]
|
||||
private static List<int> tempIntList = new List();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C96 RID: 3222
|
||||
[Token(Token = "0x2000C96")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterNode
|
||||
{
|
||||
// Token: 0x06004D8E RID: 19854 RVA: 0x00120ED4 File Offset: 0x0011F0D4
|
||||
[Token(Token = "0x6004D8E")]
|
||||
[Address(RVA = "0x1B354F0", Offset = "0x1B33EF0", VA = "0x181B354F0")]
|
||||
public ClusterNode(List<IClusterLODComponent> components, [Optional] ClusterNode parent)
|
||||
{
|
||||
this.parent = parent;
|
||||
int num = 0;
|
||||
this.components = components;
|
||||
int num2 = ClusterUtil.GetVertexCount(components, num);
|
||||
this.vertexCount = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0400399D RID: 14749
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400399D")]
|
||||
public List<IClusterLODComponent> components;
|
||||
|
||||
// Token: 0x0400399E RID: 14750
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400399E")]
|
||||
public ClusterNode parent;
|
||||
|
||||
// Token: 0x0400399F RID: 14751
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400399F")]
|
||||
public ClusterNode child1;
|
||||
|
||||
// Token: 0x040039A0 RID: 14752
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40039A0")]
|
||||
public ClusterNode child2;
|
||||
|
||||
// Token: 0x040039A1 RID: 14753
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40039A1")]
|
||||
public int vertexCount;
|
||||
|
||||
// Token: 0x040039A2 RID: 14754
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x40039A2")]
|
||||
public Bounds bounds;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C97 RID: 3223
|
||||
[Token(Token = "0x2000C97")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterTree
|
||||
{
|
||||
// Token: 0x17000D74 RID: 3444
|
||||
// (get) Token: 0x06004D8F RID: 19855 RVA: 0x00120F08 File Offset: 0x0011F108
|
||||
// (set) Token: 0x06004D90 RID: 19856 RVA: 0x00120F1C File Offset: 0x0011F11C
|
||||
[Token(Token = "0x17000D74")]
|
||||
public ClusterNode Root
|
||||
{
|
||||
[Token(Token = "0x6004D8F")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
get;
|
||||
[Token(Token = "0x6004D90")]
|
||||
[Address(RVA = "0x3C39B0", Offset = "0x3C23B0", VA = "0x1803C39B0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x06004D91 RID: 19857 RVA: 0x00120F30 File Offset: 0x0011F130
|
||||
[Token(Token = "0x6004D91")]
|
||||
[Address(RVA = "0x1B371E0", Offset = "0x1B35BE0", VA = "0x181B371E0")]
|
||||
public ClusterTree(ClusterNode root)
|
||||
{
|
||||
List<ClusterNode> list = new List();
|
||||
this.Nodes = list;
|
||||
base..ctor();
|
||||
List<ClusterNode> nodes = this.Nodes;
|
||||
this.Root = root;
|
||||
nodes.Add(root);
|
||||
}
|
||||
|
||||
// Token: 0x040039A4 RID: 14756
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40039A4")]
|
||||
public List<ClusterNode> Nodes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C98 RID: 3224
|
||||
[Token(Token = "0x2000C98")]
|
||||
[StructLayout(3)]
|
||||
public class ClusterTreeGenerator
|
||||
{
|
||||
// Token: 0x06004D92 RID: 19858 RVA: 0x00120F6C File Offset: 0x0011F16C
|
||||
[Token(Token = "0x6004D92")]
|
||||
[Address(RVA = "0x1B37180", Offset = "0x1B35B80", VA = "0x181B37180")]
|
||||
public ClusterTreeGenerator(int minNumVerts, int maxNumVerts, float maxRadius, int minNumObjectPerCluster, float distributeVSminimize = 0.5f)
|
||||
{
|
||||
this.maxRadius = maxRadius;
|
||||
this.minNumVerts = minNumVerts;
|
||||
this.distributeVSminimize = (float)0;
|
||||
this.maxNumVerts = maxNumVerts;
|
||||
this.minNumObjectPerCluster = 0;
|
||||
}
|
||||
|
||||
// Token: 0x17000D75 RID: 3445
|
||||
// (get) Token: 0x06004D93 RID: 19859 RVA: 0x00120FA4 File Offset: 0x0011F1A4
|
||||
// (set) Token: 0x06004D94 RID: 19860 RVA: 0x00120FB8 File Offset: 0x0011F1B8
|
||||
[Token(Token = "0x17000D75")]
|
||||
public ClusterTree Tree
|
||||
{
|
||||
[Token(Token = "0x6004D93")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
||||
get;
|
||||
[Token(Token = "0x6004D94")]
|
||||
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x06004D95 RID: 19861 RVA: 0x00120FCC File Offset: 0x0011F1CC
|
||||
[Token(Token = "0x6004D95")]
|
||||
[Address(RVA = "0x1B362B0", Offset = "0x1B34CB0", VA = "0x181B362B0")]
|
||||
public void InitTree(List<IClusterLODComponent> components)
|
||||
{
|
||||
int num = 0;
|
||||
ClusterNode clusterNode;
|
||||
clusterNode.components = components;
|
||||
int vertexCount = ClusterUtil.GetVertexCount(components, num);
|
||||
clusterNode.vertexCount = vertexCount;
|
||||
List<ClusterNode> list = new List();
|
||||
ClusterTree clusterTree;
|
||||
clusterTree.Nodes = list;
|
||||
List<ClusterNode> nodes = clusterTree.Nodes;
|
||||
clusterTree.<Root>k__BackingField = clusterNode;
|
||||
nodes.Add(clusterNode);
|
||||
this.<Tree>k__BackingField = clusterTree;
|
||||
Stack<ClusterNode> stack = new Stack();
|
||||
ClusterTree clusterTree2 = this.<Tree>k__BackingField;
|
||||
this.unProcessedClusters = stack;
|
||||
ClusterNode <Root>k__BackingField = clusterTree2.<Root>k__BackingField;
|
||||
stack.Push(<Root>k__BackingField);
|
||||
}
|
||||
|
||||
// Token: 0x06004D96 RID: 19862 RVA: 0x00121054 File Offset: 0x0011F254
|
||||
[Token(Token = "0x6004D96")]
|
||||
[Address(RVA = "0x1B35560", Offset = "0x1B33F60", VA = "0x181B35560")]
|
||||
public bool GenerateTreeCluster()
|
||||
{
|
||||
ClusterNode clusterNode = this.unProcessedClusters.Pop();
|
||||
bool flag = this.SplitCluster(clusterNode);
|
||||
Stack<ClusterNode> stack = this.unProcessedClusters;
|
||||
bool flag2;
|
||||
return flag2;
|
||||
}
|
||||
|
||||
// Token: 0x06004D97 RID: 19863 RVA: 0x00121084 File Offset: 0x0011F284
|
||||
[Token(Token = "0x6004D97")]
|
||||
[Address(RVA = "0x1B361A0", Offset = "0x1B34BA0", VA = "0x181B361A0")]
|
||||
private float GetVolume(Vector3 min, Vector3 max)
|
||||
{
|
||||
float z = min.z;
|
||||
float z2 = max.z;
|
||||
Vector3 vector;
|
||||
float num = vector.z;
|
||||
float num2;
|
||||
num = num2;
|
||||
num2 = num;
|
||||
return num2;
|
||||
}
|
||||
|
||||
// Token: 0x06004D98 RID: 19864 RVA: 0x001210B4 File Offset: 0x0011F2B4
|
||||
[Token(Token = "0x6004D98")]
|
||||
[Address(RVA = "0x1B36100", Offset = "0x1B34B00", VA = "0x181B36100")]
|
||||
private float GetVolume(Vector3 size)
|
||||
{
|
||||
float num = size.z;
|
||||
float num2;
|
||||
num = num2;
|
||||
num2 = num;
|
||||
return num2;
|
||||
}
|
||||
|
||||
// Token: 0x06004D99 RID: 19865 RVA: 0x001210D0 File Offset: 0x0011F2D0
|
||||
[Token(Token = "0x6004D99")]
|
||||
[Address(RVA = "0x1B367A0", Offset = "0x1B351A0", VA = "0x181B367A0")]
|
||||
private bool SplitCluster(ClusterNode cluster)
|
||||
{
|
||||
int num = 0;
|
||||
List<IClusterLODComponent> components = cluster.components;
|
||||
int num2 = this.minNumObjectPerCluster;
|
||||
num2 += num2;
|
||||
if (cluster.vertexCount < this.maxNumVerts)
|
||||
{
|
||||
float num3 = this.maxRadius;
|
||||
}
|
||||
List<IClusterLODComponent> list = new List();
|
||||
float num5;
|
||||
float num4 = Mathf.Max(num5, num5) * 0.3f;
|
||||
List<IClusterLODComponent> components2 = cluster.components;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
float num6;
|
||||
num5 = num6;
|
||||
num5 = Mathf.Max(num6, num5);
|
||||
while (num5 <= num4)
|
||||
{
|
||||
}
|
||||
num += 19;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
if (list._size <= 0)
|
||||
{
|
||||
goto IL_10F;
|
||||
}
|
||||
List.Enumerator enumerator2;
|
||||
if (enumerator2 != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
num++;
|
||||
int num7 = 0;
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
ClusterNode clusterNode;
|
||||
clusterNode.parent = cluster;
|
||||
clusterNode.components = num;
|
||||
int num8 = 0;
|
||||
int vertexCount = ClusterUtil.GetVertexCount(num, num8);
|
||||
clusterNode.vertexCount = vertexCount;
|
||||
cluster.child1 = clusterNode;
|
||||
this.<Tree>k__BackingField.Nodes.Add(clusterNode);
|
||||
ClusterNode clusterNode2;
|
||||
clusterNode2.parent = cluster;
|
||||
clusterNode2.components = list;
|
||||
int num9 = 0;
|
||||
int vertexCount2 = ClusterUtil.GetVertexCount(list, num9);
|
||||
clusterNode2.vertexCount = vertexCount2;
|
||||
cluster.child2 = clusterNode2;
|
||||
List<ClusterNode> nodes = this.<Tree>k__BackingField.Nodes;
|
||||
IL_10F:
|
||||
ClusterTreeGenerator.SplitResult splitResult;
|
||||
int bestIndex = splitResult.bestIndex;
|
||||
int num10 = 0;
|
||||
List<IClusterLODComponent> range = list.GetRange(num10, bestIndex);
|
||||
ClusterNode clusterNode3;
|
||||
clusterNode3.parent = cluster;
|
||||
clusterNode3.components = range;
|
||||
int num11 = 0;
|
||||
int vertexCount3 = ClusterUtil.GetVertexCount(range, num11);
|
||||
clusterNode3.vertexCount = vertexCount3;
|
||||
cluster.child1 = clusterNode3;
|
||||
this.<Tree>k__BackingField.Nodes.Add(clusterNode3);
|
||||
int num12 = list._size;
|
||||
num12 -= clusterNode3;
|
||||
ClusterNode clusterNode4;
|
||||
clusterNode4.parent = cluster;
|
||||
List<IClusterLODComponent> list2;
|
||||
clusterNode4.components = list2;
|
||||
int num13 = 0;
|
||||
int vertexCount4 = ClusterUtil.GetVertexCount(list2, num13);
|
||||
clusterNode4.vertexCount = vertexCount4;
|
||||
cluster.child2 = clusterNode4;
|
||||
this.<Tree>k__BackingField.Nodes.Add(clusterNode4);
|
||||
Stack<ClusterNode> stack = this.unProcessedClusters;
|
||||
ClusterNode child = cluster.child1;
|
||||
stack.Push(child);
|
||||
Stack<ClusterNode> stack2 = this.unProcessedClusters;
|
||||
ClusterNode child2 = cluster.child2;
|
||||
stack2.Push(child2);
|
||||
List<ClusterNode> nodes2 = this.<Tree>k__BackingField.Nodes;
|
||||
ClusterNode child3 = cluster.child1;
|
||||
nodes2.Add(child3);
|
||||
List<ClusterNode> nodes3 = this.<Tree>k__BackingField.Nodes;
|
||||
ClusterNode child4 = cluster.child2;
|
||||
nodes3.Add(child4);
|
||||
cluster.components = num7;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D9A RID: 19866 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D9A")]
|
||||
[Address(RVA = "0x1B355D0", Offset = "0x1B33FD0", VA = "0x181B355D0")]
|
||||
private ClusterTreeGenerator.SplitResult GetSplitResult(List<IClusterLODComponent> rawComponents, ClusterTreeGenerator.Axis axis)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D9B RID: 19867 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D9B")]
|
||||
[Address(RVA = "0x1B36410", Offset = "0x1B34E10", VA = "0x181B36410")]
|
||||
private void SetupMinMaxBuffers(List<IClusterLODComponent> components, Vector3[] minValues, Vector3[] maxValues)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x040039A5 RID: 14757
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40039A5")]
|
||||
private ClusterTreeGenerator.Stats stats;
|
||||
|
||||
// Token: 0x040039A7 RID: 14759
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40039A7")]
|
||||
private int minNumObjectPerCluster;
|
||||
|
||||
// Token: 0x040039A8 RID: 14760
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x40039A8")]
|
||||
private int minNumVerts;
|
||||
|
||||
// Token: 0x040039A9 RID: 14761
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40039A9")]
|
||||
private int maxNumVerts;
|
||||
|
||||
// Token: 0x040039AA RID: 14762
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x40039AA")]
|
||||
private float maxRadius;
|
||||
|
||||
// Token: 0x040039AB RID: 14763
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40039AB")]
|
||||
private float distributeVSminimize;
|
||||
|
||||
// Token: 0x040039AC RID: 14764
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40039AC")]
|
||||
private Stack<ClusterNode> unProcessedClusters;
|
||||
|
||||
// Token: 0x02000C99 RID: 3225
|
||||
[Token(Token = "0x2000C99")]
|
||||
private struct Stats
|
||||
{
|
||||
// Token: 0x040039AD RID: 14765
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x40039AD")]
|
||||
public int numOverSized;
|
||||
|
||||
// Token: 0x040039AE RID: 14766
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x4")]
|
||||
[Token(Token = "0x40039AE")]
|
||||
public int xSplits;
|
||||
|
||||
// Token: 0x040039AF RID: 14767
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
|
||||
[Token(Token = "0x40039AF")]
|
||||
public int ySplits;
|
||||
|
||||
// Token: 0x040039B0 RID: 14768
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC")]
|
||||
[Token(Token = "0x40039B0")]
|
||||
public int zSplits;
|
||||
}
|
||||
|
||||
// Token: 0x02000C9A RID: 3226
|
||||
[Token(Token = "0x2000C9A")]
|
||||
private struct SplitResult
|
||||
{
|
||||
// Token: 0x040039B1 RID: 14769
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x40039B1")]
|
||||
public int bestIndex;
|
||||
|
||||
// Token: 0x040039B2 RID: 14770
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x4")]
|
||||
[Token(Token = "0x40039B2")]
|
||||
public float bestVolume;
|
||||
|
||||
// Token: 0x040039B3 RID: 14771
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
|
||||
[Token(Token = "0x40039B3")]
|
||||
public List<IClusterLODComponent> components;
|
||||
}
|
||||
|
||||
// Token: 0x02000C9B RID: 3227
|
||||
[Token(Token = "0x2000C9B")]
|
||||
private enum Axis
|
||||
{
|
||||
// Token: 0x040039B5 RID: 14773
|
||||
[Token(Token = "0x40039B5")]
|
||||
X_AXIS,
|
||||
// Token: 0x040039B6 RID: 14774
|
||||
[Token(Token = "0x40039B6")]
|
||||
Y_AXIS,
|
||||
// Token: 0x040039B7 RID: 14775
|
||||
[Token(Token = "0x40039B7")]
|
||||
Z_AXIS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C9D RID: 3229
|
||||
[Token(Token = "0x2000C9D")]
|
||||
[StructLayout(3)]
|
||||
internal static class ClusterUtil
|
||||
{
|
||||
// Token: 0x06004DA1 RID: 19873 RVA: 0x001213FC File Offset: 0x0011F5FC
|
||||
[Token(Token = "0x6004DA1")]
|
||||
[Address(RVA = "0x1B37270", Offset = "0x1B35C70", VA = "0x181B37270")]
|
||||
public static Bounds GetBounds(List<IClusterLODComponent> components)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator == 0 || (ulong)1L == 0UL)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004DA2 RID: 19874 RVA: 0x00121430 File Offset: 0x0011F630
|
||||
[Token(Token = "0x6004DA2")]
|
||||
[Address(RVA = "0x1B37460", Offset = "0x1B35E60", VA = "0x181B37460")]
|
||||
public static int GetVertexCount(List<IClusterLODComponent> components, int lod)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
List.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
int index = enumerator.index;
|
||||
if (num < index)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
num += num;
|
||||
num++;
|
||||
num += 19;
|
||||
num += 19;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C81 RID: 3201
|
||||
[Token(Token = "0x2000C81")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 144)]
|
||||
public struct CombineVertsJob : IJob
|
||||
{
|
||||
// Token: 0x06004D15 RID: 19733 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D15")]
|
||||
[Address(RVA = "0x23E990", Offset = "0x23DD90", VA = "0x18023E990")]
|
||||
public CombineVertsJob(NativeClusterMesh mesh, MeshOptimizationData optimData)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D16 RID: 19734 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D16")]
|
||||
[Address(RVA = "0x23E980", Offset = "0x23DD80", VA = "0x18023E980", Slot = "4")]
|
||||
public void Execute()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x04003907 RID: 14599
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4003907")]
|
||||
[ReadOnly]
|
||||
private NativeList<MeshComponentInfo> componentInfo;
|
||||
|
||||
// Token: 0x04003908 RID: 14600
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003908")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> verts;
|
||||
|
||||
// Token: 0x04003909 RID: 14601
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003909")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float3> normals;
|
||||
|
||||
// Token: 0x0400390A RID: 14602
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400390A")]
|
||||
[ReadOnly]
|
||||
private NativeList<int> indices;
|
||||
|
||||
// Token: 0x0400390B RID: 14603
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400390B")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float> maxDistSq;
|
||||
|
||||
// Token: 0x0400390C RID: 14604
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400390C")]
|
||||
[ReadOnly]
|
||||
private NativeArray<int> vertOwner;
|
||||
|
||||
// Token: 0x0400390D RID: 14605
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400390D")]
|
||||
private NativeArray<int> mapping;
|
||||
|
||||
// Token: 0x0400390E RID: 14606
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400390E")]
|
||||
private NativeArray<int> mappedToOld;
|
||||
|
||||
// Token: 0x0400390F RID: 14607
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400390F")]
|
||||
private NativeArray<int> triangleRemoved;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C90 RID: 3216
|
||||
[Token(Token = "0x2000C90")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 208)]
|
||||
public struct ConcatMeshJob : IJob
|
||||
{
|
||||
// Token: 0x06004D66 RID: 19814 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D66")]
|
||||
[Address(RVA = "0x23E9B0", Offset = "0x23DDB0", VA = "0x18023E9B0")]
|
||||
public ConcatMeshJob(NativeClusterMesh srcMesh, NativeClusterMesh destMesh)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D67 RID: 19815 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D67")]
|
||||
[Address(RVA = "0x23E9A0", Offset = "0x23DDA0", VA = "0x18023E9A0", Slot = "4")]
|
||||
public void Execute()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x04003972 RID: 14706
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4003972")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> srcVerts;
|
||||
|
||||
// Token: 0x04003973 RID: 14707
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003973")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float3> srcNormals;
|
||||
|
||||
// Token: 0x04003974 RID: 14708
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003974")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float4> srcTangents;
|
||||
|
||||
// Token: 0x04003975 RID: 14709
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4003975")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float2> srcUVs;
|
||||
|
||||
// Token: 0x04003976 RID: 14710
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4003976")]
|
||||
[ReadOnly]
|
||||
private NativeList<int> srcIndices;
|
||||
|
||||
// Token: 0x04003977 RID: 14711
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4003977")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float4> srcMaterialIndices;
|
||||
|
||||
// Token: 0x04003978 RID: 14712
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4003978")]
|
||||
private NativeList<MeshComponentInfo> destComponentInfo;
|
||||
|
||||
// Token: 0x04003979 RID: 14713
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4003979")]
|
||||
private NativeList<float3> destVerts;
|
||||
|
||||
// Token: 0x0400397A RID: 14714
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400397A")]
|
||||
[WriteOnly]
|
||||
private NativeArray<float3> destNormals;
|
||||
|
||||
// Token: 0x0400397B RID: 14715
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x400397B")]
|
||||
[WriteOnly]
|
||||
private NativeArray<float4> destTangents;
|
||||
|
||||
// Token: 0x0400397C RID: 14716
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x400397C")]
|
||||
[WriteOnly]
|
||||
private NativeArray<float4> destMaterialIndices;
|
||||
|
||||
// Token: 0x0400397D RID: 14717
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x400397D")]
|
||||
[WriteOnly]
|
||||
private NativeArray<float2> destUVs;
|
||||
|
||||
// Token: 0x0400397E RID: 14718
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC0")]
|
||||
[Token(Token = "0x400397E")]
|
||||
private NativeList<int> destIndices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using RecRoom;
|
||||
using Unity.Jobs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C9E RID: 3230
|
||||
[Token(Token = "0x2000C9E")]
|
||||
[StructLayout(3)]
|
||||
public class CreateMeshFromClusterJob : IDisposable
|
||||
{
|
||||
// Token: 0x17000D76 RID: 3446
|
||||
// (get) Token: 0x06004DA3 RID: 19875 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// (set) Token: 0x06004DA4 RID: 19876 RVA: 0x0012148C File Offset: 0x0011F68C
|
||||
[Token(Token = "0x17000D76")]
|
||||
public JobHandle jobHandle
|
||||
{
|
||||
[Token(Token = "0x6004DA3")]
|
||||
[Address(RVA = "0xE6BDC0", Offset = "0xE6A7C0", VA = "0x180E6BDC0")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
[Token(Token = "0x6004DA4")]
|
||||
[Address(RVA = "0xE727D0", Offset = "0xE711D0", VA = "0x180E727D0")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000D77 RID: 3447
|
||||
// (get) Token: 0x06004DA5 RID: 19877 RVA: 0x0012149C File Offset: 0x0011F69C
|
||||
// (set) Token: 0x06004DA6 RID: 19878 RVA: 0x001214B0 File Offset: 0x0011F6B0
|
||||
[Token(Token = "0x17000D77")]
|
||||
public ClusterMesh.ClusterInfo cluster
|
||||
{
|
||||
[Token(Token = "0x6004DA5")]
|
||||
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
|
||||
get;
|
||||
[Token(Token = "0x6004DA6")]
|
||||
[Address(RVA = "0x3C1290", Offset = "0x3BFC90", VA = "0x1803C1290")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x17000D78 RID: 3448
|
||||
// (get) Token: 0x06004DA7 RID: 19879 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x17000D78")]
|
||||
public bool Active
|
||||
{
|
||||
[Token(Token = "0x6004DA7")]
|
||||
[Address(RVA = "0x78E160", Offset = "0x78CB60", VA = "0x18078E160")]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000D79 RID: 3449
|
||||
// (get) Token: 0x06004DA8 RID: 19880 RVA: 0x001214C4 File Offset: 0x0011F6C4
|
||||
[Token(Token = "0x17000D79")]
|
||||
public NativeClusterMesh SharedNativeMesh
|
||||
{
|
||||
[Token(Token = "0x6004DA8")]
|
||||
[Address(RVA = "0x3D32F0", Offset = "0x3D1CF0", VA = "0x1803D32F0")]
|
||||
get
|
||||
{
|
||||
return this.resultMesh;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004DA9 RID: 19881 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004DA9")]
|
||||
[Address(RVA = "0x1B37FA0", Offset = "0x1B369A0", VA = "0x181B37FA0")]
|
||||
public void Init(ClusterMesh.ClusterInfo clusterInfo, Transform root, int lod)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004DAA RID: 19882 RVA: 0x001214D8 File Offset: 0x0011F6D8
|
||||
[Token(Token = "0x6004DAA")]
|
||||
[Address(RVA = "0x1B37B90", Offset = "0x1B36590", VA = "0x181B37B90")]
|
||||
public void CreateMesh()
|
||||
{
|
||||
ClusterLODConfig <Config>k__BackingField = ClusterLODManager._instance.<Config>k__BackingField;
|
||||
if (this.currentLod != 0)
|
||||
{
|
||||
}
|
||||
ClusterLODConfig.LODSettings near = <Config>k__BackingField.near;
|
||||
JobHandle jobHandle = this.<jobHandle>k__BackingField;
|
||||
bool useMaterials = near.useMaterials;
|
||||
NativeClusterMesh nativeClusterMesh = this.resultMesh;
|
||||
NativeClusterMesh sharedAdditionalMesh = CreateMeshFromClusterJob.SharedAdditionalMesh;
|
||||
Mesh mesh = nativeClusterMesh.CreateMesh(sharedAdditionalMesh, useMaterials);
|
||||
ClusterMesh.ClusterInfo clusterInfo = this.<cluster>k__BackingField;
|
||||
Mesh <RequestedMesh>k__BackingField = clusterInfo.<RequestedMesh>k__BackingField;
|
||||
Mesh <ActiveMesh>k__BackingField = clusterInfo.<ActiveMesh>k__BackingField;
|
||||
if (<RequestedMesh>k__BackingField != <ActiveMesh>k__BackingField)
|
||||
{
|
||||
SafeDestroy.Asset(clusterInfo.<RequestedMesh>k__BackingField);
|
||||
}
|
||||
clusterInfo.<RequestedMesh>k__BackingField = mesh;
|
||||
ulong num;
|
||||
mesh.UploadMeshData(num != 0UL);
|
||||
NativeClusterMesh nativeClusterMesh2 = this.resultMesh;
|
||||
ClusterMesh.ClusterInfo clusterInfo2 = this.<cluster>k__BackingField;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004DAB RID: 19883 RVA: 0x001215D4 File Offset: 0x0011F7D4
|
||||
[Token(Token = "0x6004DAB")]
|
||||
[Address(RVA = "0x1B37F00", Offset = "0x1B36900", VA = "0x181B37F00", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
JobHandle jobHandle = this.<jobHandle>k__BackingField;
|
||||
this.sharedResultMesh.Dispose();
|
||||
this.meshOptimizationData.Dispose();
|
||||
ClusterLODCollection clusterLODCollection = this.sharedClusterLODCollection;
|
||||
throw new MissingMethodException();
|
||||
}
|
||||
|
||||
// Token: 0x06004DAC RID: 19884 RVA: 0x00121614 File Offset: 0x0011F814
|
||||
[Token(Token = "0x6004DAC")]
|
||||
[Address(RVA = "0x1B37B60", Offset = "0x1B36560", VA = "0x181B37B60")]
|
||||
public void Clear()
|
||||
{
|
||||
JobHandle jobHandle = this.<jobHandle>k__BackingField;
|
||||
this.<cluster>k__BackingField = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x06004DAD RID: 19885 RVA: 0x00121634 File Offset: 0x0011F834
|
||||
[Token(Token = "0x6004DAD")]
|
||||
[Address(RVA = "0x1B393C0", Offset = "0x1B37DC0", VA = "0x181B393C0")]
|
||||
public CreateMeshFromClusterJob()
|
||||
{
|
||||
NativeClusterMesh nativeClusterMesh = new NativeClusterMesh();
|
||||
this.sharedResultMesh = nativeClusterMesh;
|
||||
MeshOptimizationData meshOptimizationData = new MeshOptimizationData();
|
||||
this.meshOptimizationData = meshOptimizationData;
|
||||
ClusterLODCollection clusterLODCollection = new ClusterLODCollection();
|
||||
this.sharedClusterLODCollection = clusterLODCollection;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x040039BD RID: 14781
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40039BD")]
|
||||
private NativeClusterMesh sharedResultMesh;
|
||||
|
||||
// Token: 0x040039BE RID: 14782
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40039BE")]
|
||||
private MeshOptimizationData meshOptimizationData;
|
||||
|
||||
// Token: 0x040039C0 RID: 14784
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40039C0")]
|
||||
private ClusterLODCollection sharedClusterLODCollection;
|
||||
|
||||
// Token: 0x040039C1 RID: 14785
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40039C1")]
|
||||
private NativeClusterMesh resultMesh;
|
||||
|
||||
// Token: 0x040039C2 RID: 14786
|
||||
[Token(Token = "0x40039C2")]
|
||||
public static readonly NativeClusterMesh SharedAdditionalMesh = new NativeClusterMesh();
|
||||
|
||||
// Token: 0x040039C3 RID: 14787
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40039C3")]
|
||||
private int currentLod;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C9F RID: 3231
|
||||
[Token(Token = "0x2000C9F")]
|
||||
[StructLayout(3)]
|
||||
public static class FastCopy
|
||||
{
|
||||
// Token: 0x06004DAF RID: 19887 RVA: 0x00121688 File Offset: 0x0011F888
|
||||
[Token(Token = "0x6004DAF")]
|
||||
[Address(RVA = "0x1B3A020", Offset = "0x1B38A20", VA = "0x181B3A020")]
|
||||
private unsafe static void FastCopyVector2Array(NativeArray<float2> from, Vector2[] to, int count)
|
||||
{
|
||||
if (to == 0 || to.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float2>();
|
||||
int num3 = count * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num3);
|
||||
}
|
||||
|
||||
// Token: 0x06004DB0 RID: 19888 RVA: 0x001216B8 File Offset: 0x0011F8B8
|
||||
[Token(Token = "0x6004DB0")]
|
||||
[Address(RVA = "0x1B3A700", Offset = "0x1B39100", VA = "0x181B3A700")]
|
||||
public unsafe static List<Vector2> GetTempVector2List(NativeArray<float2> from, int count, bool append)
|
||||
{
|
||||
if (FastCopy.tempVector2Array.Length < count)
|
||||
{
|
||||
FastCopy.tempVector2Array = new Vector2[count];
|
||||
}
|
||||
Vector2[] array = FastCopy.tempVector2Array;
|
||||
if (array == 0 || array.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float2>() * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num2);
|
||||
if (!append)
|
||||
{
|
||||
FastCopy.tempVector2List.Clear();
|
||||
}
|
||||
List<Vector2> list = FastCopy.tempVector2List;
|
||||
return FastCopy.tempVector2List;
|
||||
}
|
||||
|
||||
// Token: 0x06004DB1 RID: 19889 RVA: 0x00121728 File Offset: 0x0011F928
|
||||
[Token(Token = "0x6004DB1")]
|
||||
[Address(RVA = "0x1B3A0C0", Offset = "0x1B38AC0", VA = "0x181B3A0C0")]
|
||||
private unsafe static void FastCopyVector3Array(NativeArray<float3> from, Vector3[] to, int count)
|
||||
{
|
||||
if (to == 0 || to.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float3>();
|
||||
int num3 = count * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num3);
|
||||
}
|
||||
|
||||
// Token: 0x06004DB2 RID: 19890 RVA: 0x00121758 File Offset: 0x0011F958
|
||||
[Token(Token = "0x6004DB2")]
|
||||
[Address(RVA = "0x1B3A980", Offset = "0x1B39380", VA = "0x181B3A980")]
|
||||
public unsafe static List<Vector3> GetTempVector3List(NativeArray<float3> from, int count, bool append)
|
||||
{
|
||||
if (FastCopy.tempVector3Array.Length < count)
|
||||
{
|
||||
FastCopy.tempVector3Array = new Vector3[count];
|
||||
}
|
||||
Vector3[] array = FastCopy.tempVector3Array;
|
||||
if (array == 0 || array.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float3>() * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num2);
|
||||
if (!append)
|
||||
{
|
||||
FastCopy.tempVector3List.Clear();
|
||||
}
|
||||
List<Vector3> list = FastCopy.tempVector3List;
|
||||
return FastCopy.tempVector3List;
|
||||
}
|
||||
|
||||
// Token: 0x06004DB3 RID: 19891 RVA: 0x001217C8 File Offset: 0x0011F9C8
|
||||
[Token(Token = "0x6004DB3")]
|
||||
[Address(RVA = "0x1B3A160", Offset = "0x1B38B60", VA = "0x181B3A160")]
|
||||
private unsafe static void FastCopyVector4Array(NativeArray<float4> from, Vector4[] to, int count)
|
||||
{
|
||||
if (to == 0 || to.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float4>();
|
||||
int num3 = count * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num3);
|
||||
}
|
||||
|
||||
// Token: 0x06004DB4 RID: 19892 RVA: 0x001217F8 File Offset: 0x0011F9F8
|
||||
[Token(Token = "0x6004DB4")]
|
||||
[Address(RVA = "0x1B3AC00", Offset = "0x1B39600", VA = "0x181B3AC00")]
|
||||
public unsafe static List<Vector4> GetTempVector4List(NativeArray<float4> from, int count, bool append)
|
||||
{
|
||||
if (FastCopy.tempVector4Array.Length < count)
|
||||
{
|
||||
FastCopy.tempVector4Array = new Vector4[count];
|
||||
}
|
||||
Vector4[] array = FastCopy.tempVector4Array;
|
||||
if (array == 0 || array.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float4>() * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num2);
|
||||
if (!append)
|
||||
{
|
||||
FastCopy.tempVector4List.Clear();
|
||||
}
|
||||
List<Vector4> list = FastCopy.tempVector4List;
|
||||
return FastCopy.tempVector4List;
|
||||
}
|
||||
|
||||
// Token: 0x06004DB5 RID: 19893 RVA: 0x00121868 File Offset: 0x0011FA68
|
||||
[Token(Token = "0x6004DB5")]
|
||||
[Address(RVA = "0x1B39F80", Offset = "0x1B38980", VA = "0x181B39F80")]
|
||||
private unsafe static void FastCopyIntArray(NativeArray<int> from, int[] to, int count)
|
||||
{
|
||||
if (to == 0 || to.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<int>();
|
||||
int num3 = count * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num3);
|
||||
}
|
||||
|
||||
// Token: 0x06004DB6 RID: 19894 RVA: 0x00121898 File Offset: 0x0011FA98
|
||||
[Token(Token = "0x6004DB6")]
|
||||
[Address(RVA = "0x1B3A480", Offset = "0x1B38E80", VA = "0x181B3A480")]
|
||||
public unsafe static List<int> GetTempIntList(NativeArray<int> from, int count, bool append)
|
||||
{
|
||||
if (FastCopy.tempIntArray.Length < count)
|
||||
{
|
||||
FastCopy.tempIntArray = new int[count];
|
||||
}
|
||||
int[] array = FastCopy.tempIntArray;
|
||||
if (array == 0 || array.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<int>() * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num2);
|
||||
if (!append)
|
||||
{
|
||||
FastCopy.tempIntList.Clear();
|
||||
}
|
||||
List<int> list = FastCopy.tempIntList;
|
||||
return FastCopy.tempIntList;
|
||||
}
|
||||
|
||||
// Token: 0x06004DB7 RID: 19895 RVA: 0x00121908 File Offset: 0x0011FB08
|
||||
[Token(Token = "0x6004DB7")]
|
||||
[Address(RVA = "0x1B39EE0", Offset = "0x1B388E0", VA = "0x181B39EE0")]
|
||||
private unsafe static void FastCopyColorArray(NativeArray<float4> from, Color[] to, int count)
|
||||
{
|
||||
if (to == 0 || to.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float4>();
|
||||
int num3 = count * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num3);
|
||||
}
|
||||
|
||||
// Token: 0x06004DB8 RID: 19896 RVA: 0x00121938 File Offset: 0x0011FB38
|
||||
[Token(Token = "0x6004DB8")]
|
||||
[Address(RVA = "0x1B3A200", Offset = "0x1B38C00", VA = "0x181B3A200")]
|
||||
public unsafe static List<Color> GetTempColorList(NativeArray<float4> from, int count, bool append)
|
||||
{
|
||||
if (FastCopy.tempColorArray.Length < count)
|
||||
{
|
||||
FastCopy.tempColorArray = new Color[count];
|
||||
}
|
||||
Color[] array = FastCopy.tempColorArray;
|
||||
if (array == 0 || array.Length != 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = UnsafeUtility.SizeOf<float4>() * count;
|
||||
void* ptr;
|
||||
UnsafeUtility.MemCpy(num, ptr, (long)num2);
|
||||
if (!append)
|
||||
{
|
||||
FastCopy.tempColorList.Clear();
|
||||
}
|
||||
List<Color> list = FastCopy.tempColorList;
|
||||
return FastCopy.tempColorList;
|
||||
}
|
||||
|
||||
// Token: 0x040039C4 RID: 14788
|
||||
[Token(Token = "0x40039C4")]
|
||||
private static Vector2[] tempVector2Array = new Vector2[1];
|
||||
|
||||
// Token: 0x040039C5 RID: 14789
|
||||
[Token(Token = "0x40039C5")]
|
||||
private static List<Vector2> tempVector2List = new List();
|
||||
|
||||
// Token: 0x040039C6 RID: 14790
|
||||
[Token(Token = "0x40039C6")]
|
||||
private static Vector3[] tempVector3Array = new Vector3[1];
|
||||
|
||||
// Token: 0x040039C7 RID: 14791
|
||||
[Token(Token = "0x40039C7")]
|
||||
private static List<Vector3> tempVector3List = new List();
|
||||
|
||||
// Token: 0x040039C8 RID: 14792
|
||||
[Token(Token = "0x40039C8")]
|
||||
private static Vector4[] tempVector4Array = new Vector4[1];
|
||||
|
||||
// Token: 0x040039C9 RID: 14793
|
||||
[Token(Token = "0x40039C9")]
|
||||
private static List<Vector4> tempVector4List = new List();
|
||||
|
||||
// Token: 0x040039CA RID: 14794
|
||||
[Token(Token = "0x40039CA")]
|
||||
private static int[] tempIntArray = new int[1];
|
||||
|
||||
// Token: 0x040039CB RID: 14795
|
||||
[Token(Token = "0x40039CB")]
|
||||
private static List<int> tempIntList = new List();
|
||||
|
||||
// Token: 0x040039CC RID: 14796
|
||||
[Token(Token = "0x40039CC")]
|
||||
private static Color[] tempColorArray = new Color[1];
|
||||
|
||||
// Token: 0x040039CD RID: 14797
|
||||
[Token(Token = "0x40039CD")]
|
||||
private static List<Color> tempColorList = new List();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C75 RID: 3189
|
||||
[Token(Token = "0x2000C75")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 184)]
|
||||
public struct FinalizeMeshOptimizationsJob : IJob
|
||||
{
|
||||
// Token: 0x06004CCA RID: 19658 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004CCA")]
|
||||
[Address(RVA = "0x23E9E0", Offset = "0x23DDE0", VA = "0x18023E9E0")]
|
||||
public FinalizeMeshOptimizationsJob(NativeClusterMesh mesh, MeshOptimizationData optimData, float vertexNormalThresh)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004CCB RID: 19659 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004CCB")]
|
||||
[Address(RVA = "0x23E9D0", Offset = "0x23DDD0", VA = "0x18023E9D0")]
|
||||
private void RemoveLastVert()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004CCC RID: 19660 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004CCC")]
|
||||
[Address(RVA = "0x23E9C0", Offset = "0x23DDC0", VA = "0x18023E9C0", Slot = "4")]
|
||||
public void Execute()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x040038A7 RID: 14503
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x40038A7")]
|
||||
private NativeList<float3> verts;
|
||||
|
||||
// Token: 0x040038A8 RID: 14504
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40038A8")]
|
||||
private NativeArray<float3> normals;
|
||||
|
||||
// Token: 0x040038A9 RID: 14505
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40038A9")]
|
||||
private NativeArray<float4> tangents;
|
||||
|
||||
// Token: 0x040038AA RID: 14506
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40038AA")]
|
||||
private NativeArray<float4> materialIndices;
|
||||
|
||||
// Token: 0x040038AB RID: 14507
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40038AB")]
|
||||
private NativeArray<float2> uvs;
|
||||
|
||||
// Token: 0x040038AC RID: 14508
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40038AC")]
|
||||
private NativeList<int> indices;
|
||||
|
||||
// Token: 0x040038AD RID: 14509
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40038AD")]
|
||||
private NativeArray<int> mapping;
|
||||
|
||||
// Token: 0x040038AE RID: 14510
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40038AE")]
|
||||
private NativeArray<int> useCount;
|
||||
|
||||
// Token: 0x040038AF RID: 14511
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x40038AF")]
|
||||
private NativeArray<float> mappingWeight;
|
||||
|
||||
// Token: 0x040038B0 RID: 14512
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x40038B0")]
|
||||
[ReadOnly]
|
||||
private NativeArray<int> triangleRemoved;
|
||||
|
||||
// Token: 0x040038B1 RID: 14513
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x40038B1")]
|
||||
[ReadOnly]
|
||||
private NativeArray<int> vertOwner;
|
||||
|
||||
// Token: 0x040038B2 RID: 14514
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x40038B2")]
|
||||
[ReadOnly]
|
||||
private float normalThresh;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C95 RID: 3221
|
||||
[Token(Token = "0x2000C95")]
|
||||
[StructLayout(3)]
|
||||
public interface IClusterLODComponent
|
||||
{
|
||||
// Token: 0x17000D73 RID: 3443
|
||||
// (get) Token: 0x06004D8C RID: 19852
|
||||
[Token(Token = "0x17000D73")]
|
||||
Bounds ClusterLODBounds
|
||||
{
|
||||
[Token(Token = "0x6004D8C")]
|
||||
[Address(Slot = "0")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06004D8D RID: 19853
|
||||
[Token(Token = "0x6004D8D")]
|
||||
[Address(Slot = "1")]
|
||||
IClusterMeshAssetGenerator ClusterLODMeshGenerator(int lod);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C89 RID: 3209
|
||||
[Token(Token = "0x2000C89")]
|
||||
[StructLayout(3)]
|
||||
public interface IClusterMeshAssetGenerator
|
||||
{
|
||||
// Token: 0x17000D69 RID: 3433
|
||||
// (get) Token: 0x06004D4A RID: 19786
|
||||
[Token(Token = "0x17000D69")]
|
||||
int VertexCount
|
||||
{
|
||||
[Token(Token = "0x6004D4A")]
|
||||
[Address(Slot = "0")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x17000D6A RID: 3434
|
||||
// (get) Token: 0x06004D4B RID: 19787
|
||||
[Token(Token = "0x17000D6A")]
|
||||
int IndexCount
|
||||
{
|
||||
[Token(Token = "0x6004D4B")]
|
||||
[Address(Slot = "1")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06004D4C RID: 19788
|
||||
[Token(Token = "0x6004D4C")]
|
||||
[Address(Slot = "2")]
|
||||
void AddComponentToClusterLODCollection(Transform root, ClusterLODCollection collection);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C7F RID: 3199
|
||||
[Token(Token = "0x2000C7F")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 168)]
|
||||
public struct InitMeshComponentsOptimsJob : IJobParallelFor
|
||||
{
|
||||
// Token: 0x06004D0B RID: 19723 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D0B")]
|
||||
[Address(RVA = "0x2AA650", Offset = "0x2A9A50", VA = "0x1802AA650")]
|
||||
public InitMeshComponentsOptimsJob(NativeClusterMesh mesh, MeshOptimizationData optimData, float maxVertexSnapDist)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D0C RID: 19724 RVA: 0x0011EF2C File Offset: 0x0011D12C
|
||||
[Token(Token = "0x6004D0C")]
|
||||
[Address(RVA = "0x2AA610", Offset = "0x2A9A10", VA = "0x1802AA610")]
|
||||
private void SetupOwner(int owner, MeshComponentInfo info)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D0D RID: 19725 RVA: 0x0011EF3C File Offset: 0x0011D13C
|
||||
[Token(Token = "0x6004D0D")]
|
||||
[Address(RVA = "0x2AA5C0", Offset = "0x2A99C0", VA = "0x1802AA5C0")]
|
||||
private void CreateVertMapingForNewShape(MeshComponentInfo info)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D0E RID: 19726 RVA: 0x0011EF4C File Offset: 0x0011D14C
|
||||
[Token(Token = "0x6004D0E")]
|
||||
[Address(RVA = "0x2AA630", Offset = "0x2A9A30", VA = "0x1802AA630")]
|
||||
private void SetupVertexStrength(MeshComponentInfo info)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D0F RID: 19727 RVA: 0x0011EF5C File Offset: 0x0011D15C
|
||||
[Token(Token = "0x6004D0F")]
|
||||
[Address(RVA = "0x2AA5F0", Offset = "0x2A99F0", VA = "0x1802AA5F0")]
|
||||
private void SetupMaxDistances(MeshComponentInfo info)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D10 RID: 19728 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D10")]
|
||||
[Address(RVA = "0x2AA5E0", Offset = "0x2A99E0", VA = "0x1802AA5E0", Slot = "4")]
|
||||
public void Execute(int componentIdx)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x040038F6 RID: 14582
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x40038F6")]
|
||||
[ReadOnly]
|
||||
private NativeList<MeshComponentInfo> componentInfo;
|
||||
|
||||
// Token: 0x040038F7 RID: 14583
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40038F7")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> verts;
|
||||
|
||||
// Token: 0x040038F8 RID: 14584
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40038F8")]
|
||||
[ReadOnly]
|
||||
private NativeList<int> indices;
|
||||
|
||||
// Token: 0x040038F9 RID: 14585
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40038F9")]
|
||||
[ReadOnly]
|
||||
private float maxSnapDist;
|
||||
|
||||
// Token: 0x040038FA RID: 14586
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40038FA")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> mapping;
|
||||
|
||||
// Token: 0x040038FB RID: 14587
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40038FB")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float> maxDistSq;
|
||||
|
||||
// Token: 0x040038FC RID: 14588
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40038FC")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> vertOwner;
|
||||
|
||||
// Token: 0x040038FD RID: 14589
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40038FD")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> mappedToOld;
|
||||
|
||||
// Token: 0x040038FE RID: 14590
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x40038FE")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> triangleRemoved;
|
||||
|
||||
// Token: 0x040038FF RID: 14591
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x40038FF")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> useCount;
|
||||
|
||||
// Token: 0x04003900 RID: 14592
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x98")]
|
||||
[Token(Token = "0x4003900")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float> mappingWeight;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C83 RID: 3203
|
||||
[Token(Token = "0x2000C83")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 32)]
|
||||
public struct InitSubdivideMeshData : IJob
|
||||
{
|
||||
// Token: 0x06004D1A RID: 19738 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D1A")]
|
||||
[Address(RVA = "0x2AA670", Offset = "0x2A9A70", VA = "0x1802AA670")]
|
||||
public InitSubdivideMeshData(SubdivideMeshData subdivideData, NativeClusterMesh mesh)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D1B RID: 19739 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D1B")]
|
||||
[Address(RVA = "0x2AA660", Offset = "0x2A9A60", VA = "0x1802AA660", Slot = "4")]
|
||||
public void Execute()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x04003914 RID: 14612
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4003914")]
|
||||
[ReadOnly]
|
||||
public NativeList<int> srcIndices;
|
||||
|
||||
// Token: 0x04003915 RID: 14613
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003915")]
|
||||
public NativeList<int> destIndices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C80 RID: 3200
|
||||
[Token(Token = "0x2000C80")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 88)]
|
||||
public struct MapToOldVertsJob : IJobParallelFor
|
||||
{
|
||||
// Token: 0x06004D11 RID: 19729 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D11")]
|
||||
[Address(RVA = "0x2AA6C0", Offset = "0x2A9AC0", VA = "0x1802AA6C0")]
|
||||
public MapToOldVertsJob(NativeClusterMesh mesh, MeshOptimizationData optimData, float maxVertexSnapDist)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D12 RID: 19730 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D12")]
|
||||
[Address(RVA = "0x2AA690", Offset = "0x2A9A90", VA = "0x1802AA690")]
|
||||
private bool IsRemapped(int i)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D13 RID: 19731 RVA: 0x0011EF6C File Offset: 0x0011D16C
|
||||
[Token(Token = "0x6004D13")]
|
||||
[Address(RVA = "0x2AA6A0", Offset = "0x2A9AA0", VA = "0x1802AA6A0")]
|
||||
private void MapToOldVerts(MeshComponentInfo info)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D14 RID: 19732 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D14")]
|
||||
[Address(RVA = "0x2AA680", Offset = "0x2A9A80", VA = "0x1802AA680", Slot = "4")]
|
||||
public void Execute(int componentIdx)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x04003901 RID: 14593
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4003901")]
|
||||
[ReadOnly]
|
||||
private NativeList<MeshComponentInfo> componentInfo;
|
||||
|
||||
// Token: 0x04003902 RID: 14594
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003902")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> verts;
|
||||
|
||||
// Token: 0x04003903 RID: 14595
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003903")]
|
||||
[ReadOnly]
|
||||
private float maxSnapDist;
|
||||
|
||||
// Token: 0x04003904 RID: 14596
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4003904")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> mapping;
|
||||
|
||||
// Token: 0x04003905 RID: 14597
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4003905")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<float> maxDistSq;
|
||||
|
||||
// Token: 0x04003906 RID: 14598
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4003906")]
|
||||
[NativeDisableContainerSafetyRestriction]
|
||||
private NativeArray<int> mappedToOld;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C8C RID: 3212
|
||||
[Token(Token = "0x2000C8C")]
|
||||
[StructLayout(0, Size = 16)]
|
||||
public struct MeshComponentInfo
|
||||
{
|
||||
// Token: 0x06004D5D RID: 19805 RVA: 0x001204FC File Offset: 0x0011E6FC
|
||||
[Token(Token = "0x6004D5D")]
|
||||
[Address(RVA = "0x2AA6D0", Offset = "0x2A9AD0", VA = "0x1802AA6D0")]
|
||||
public MeshComponentInfo(int startIndex, int indexCount, int startVertex, int vertexCount)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400394B RID: 14667
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x400394B")]
|
||||
public int startVertex;
|
||||
|
||||
// Token: 0x0400394C RID: 14668
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x4")]
|
||||
[Token(Token = "0x400394C")]
|
||||
public int startIndex;
|
||||
|
||||
// Token: 0x0400394D RID: 14669
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
|
||||
[Token(Token = "0x400394D")]
|
||||
public int indexCount;
|
||||
|
||||
// Token: 0x0400394E RID: 14670
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC")]
|
||||
[Token(Token = "0x400394E")]
|
||||
public int vertexCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Collections;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C7E RID: 3198
|
||||
[Token(Token = "0x2000C7E")]
|
||||
[StructLayout(3)]
|
||||
public class MeshOptimizationData : IDisposable
|
||||
{
|
||||
// Token: 0x06004D08 RID: 19720 RVA: 0x0011EEA8 File Offset: 0x0011D0A8
|
||||
[Token(Token = "0x6004D08")]
|
||||
[Address(RVA = "0x21F8940", Offset = "0x21F7340", VA = "0x1821F8940")]
|
||||
public void InitMemory(int numVerts, int numIndices, Allocator allocator)
|
||||
{
|
||||
throw new MissingMethodException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D09 RID: 19721 RVA: 0x0011EEE0 File Offset: 0x0011D0E0
|
||||
[Token(Token = "0x6004D09")]
|
||||
[Address(RVA = "0x21F8880", Offset = "0x21F7280", VA = "0x1821F8880", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
throw new MissingMethodException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D0A RID: 19722 RVA: 0x0011EF18 File Offset: 0x0011D118
|
||||
[Token(Token = "0x6004D0A")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public MeshOptimizationData()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040038EF RID: 14575
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40038EF")]
|
||||
public NativeArray<int> mapping;
|
||||
|
||||
// Token: 0x040038F0 RID: 14576
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40038F0")]
|
||||
public NativeArray<float> maxDistSq;
|
||||
|
||||
// Token: 0x040038F1 RID: 14577
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40038F1")]
|
||||
public NativeArray<int> mappedToOld;
|
||||
|
||||
// Token: 0x040038F2 RID: 14578
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40038F2")]
|
||||
public NativeArray<int> triangleRemoved;
|
||||
|
||||
// Token: 0x040038F3 RID: 14579
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40038F3")]
|
||||
public NativeArray<int> useCount;
|
||||
|
||||
// Token: 0x040038F4 RID: 14580
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40038F4")]
|
||||
public NativeArray<float> mappingWeight;
|
||||
|
||||
// Token: 0x040038F5 RID: 14581
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40038F5")]
|
||||
public NativeArray<int> vertOwner;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Collections;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C8B RID: 3211
|
||||
[Token(Token = "0x2000C8B")]
|
||||
[StructLayout(3)]
|
||||
public class NativeClusterMesh : IDisposable
|
||||
{
|
||||
// Token: 0x17000D6B RID: 3435
|
||||
// (get) Token: 0x06004D54 RID: 19796 RVA: 0x0012016C File Offset: 0x0011E36C
|
||||
[Token(Token = "0x17000D6B")]
|
||||
public bool IsEmpty
|
||||
{
|
||||
[Token(Token = "0x6004D54")]
|
||||
[Address(RVA = "0x21F9F50", Offset = "0x21F8950", VA = "0x1821F9F50")]
|
||||
get
|
||||
{
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000D6C RID: 3436
|
||||
// (get) Token: 0x06004D55 RID: 19797 RVA: 0x0012017C File Offset: 0x0011E37C
|
||||
[Token(Token = "0x17000D6C")]
|
||||
public int AllocatedVertexBufferCapacity
|
||||
{
|
||||
[Token(Token = "0x6004D55")]
|
||||
[Address(RVA = "0x21F9F00", Offset = "0x21F8900", VA = "0x1821F9F00")]
|
||||
get
|
||||
{
|
||||
return this.normals.m_Length;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000D6D RID: 3437
|
||||
// (get) Token: 0x06004D56 RID: 19798 RVA: 0x00120198 File Offset: 0x0011E398
|
||||
[Token(Token = "0x17000D6D")]
|
||||
public int SizeOf
|
||||
{
|
||||
[Token(Token = "0x6004D56")]
|
||||
[Address(RVA = "0x21F9F90", Offset = "0x21F8990", VA = "0x1821F9F90")]
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D57 RID: 19799 RVA: 0x001201D8 File Offset: 0x0011E3D8
|
||||
[Token(Token = "0x6004D57")]
|
||||
[Address(RVA = "0x21F9870", Offset = "0x21F8270", VA = "0x1821F9870")]
|
||||
public void InitFromMesh(Mesh mesh, Allocator allocator)
|
||||
{
|
||||
int vertexCount = mesh.vertexCount;
|
||||
int num = 0;
|
||||
uint indexCount = mesh.GetIndexCount(num);
|
||||
int num2 = 0;
|
||||
int length = mesh.vertices.Length;
|
||||
if (num2 < length)
|
||||
{
|
||||
float3 @float;
|
||||
float z = @float.z;
|
||||
num2++;
|
||||
}
|
||||
int length2 = mesh.normals.Length;
|
||||
if (num2 < length2)
|
||||
{
|
||||
num2++;
|
||||
float3 float2;
|
||||
float z2 = float2.z;
|
||||
this.normals.m_Length = (int)z2;
|
||||
num2 += 12;
|
||||
}
|
||||
int length3 = mesh.tangents.Length;
|
||||
if (num2 < length3)
|
||||
{
|
||||
num2 += 2;
|
||||
num2 += num2;
|
||||
num2++;
|
||||
NativeArray<float4> nativeArray = this.tangents;
|
||||
num2 += 16;
|
||||
}
|
||||
int length4 = mesh.uv.Length;
|
||||
if (num2 < length4)
|
||||
{
|
||||
num2++;
|
||||
float2 float3;
|
||||
this.uvs.m_Buffer = float3;
|
||||
num2 += 8;
|
||||
}
|
||||
int num3 = 0;
|
||||
int length5 = mesh.GetIndices(num3).Length;
|
||||
if (num2 < length5)
|
||||
{
|
||||
num2++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06004D58 RID: 19800 RVA: 0x001202D8 File Offset: 0x0011E4D8
|
||||
[Token(Token = "0x6004D58")]
|
||||
[Address(RVA = "0x21F8F40", Offset = "0x21F7940", VA = "0x1821F8F40")]
|
||||
public void AppendMesh(Mesh mesh, bool remapIndices)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D59 RID: 19801 RVA: 0x001203B4 File Offset: 0x0011E5B4
|
||||
[Token(Token = "0x6004D59")]
|
||||
[Address(RVA = "0x21F97B0", Offset = "0x21F81B0", VA = "0x1821F97B0", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
throw new MissingMethodException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D5A RID: 19802 RVA: 0x001203EC File Offset: 0x0011E5EC
|
||||
[Token(Token = "0x6004D5A")]
|
||||
[Address(RVA = "0x21F9BA0", Offset = "0x21F85A0", VA = "0x1821F9BA0")]
|
||||
public void InitMemory(int numVerts, int numIndices, int numComponents, Allocator allocator, bool populateLists)
|
||||
{
|
||||
if (0 < numVerts)
|
||||
{
|
||||
throw new MissingMethodException();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D5B RID: 19803 RVA: 0x00120448 File Offset: 0x0011E648
|
||||
[Token(Token = "0x6004D5B")]
|
||||
[Address(RVA = "0x21F92B0", Offset = "0x21F7CB0", VA = "0x1821F92B0")]
|
||||
public Mesh CreateMesh(NativeClusterMesh additionalMesh, bool useMaterials)
|
||||
{
|
||||
Mesh mesh = new Mesh();
|
||||
mesh.name = "ClusterLODCollection";
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D5C RID: 19804 RVA: 0x001204E8 File Offset: 0x0011E6E8
|
||||
[Token(Token = "0x6004D5C")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public NativeClusterMesh()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04003943 RID: 14659
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003943")]
|
||||
public NativeList<float3> verts;
|
||||
|
||||
// Token: 0x04003944 RID: 14660
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003944")]
|
||||
public NativeArray<float3> normals;
|
||||
|
||||
// Token: 0x04003945 RID: 14661
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4003945")]
|
||||
public NativeArray<float4> tangents;
|
||||
|
||||
// Token: 0x04003946 RID: 14662
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4003946")]
|
||||
public NativeArray<float4> materialIndices;
|
||||
|
||||
// Token: 0x04003947 RID: 14663
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4003947")]
|
||||
public NativeArray<float2> uvs;
|
||||
|
||||
// Token: 0x04003948 RID: 14664
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4003948")]
|
||||
public NativeList<int> indices;
|
||||
|
||||
// Token: 0x04003949 RID: 14665
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4003949")]
|
||||
public NativeList<MeshComponentInfo> componentInfo;
|
||||
|
||||
// Token: 0x0400394A RID: 14666
|
||||
[Token(Token = "0x400394A")]
|
||||
public static int TotalMemory;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C8D RID: 3213
|
||||
[Token(Token = "0x2000C8D")]
|
||||
[StructLayout(0, Size = 200)]
|
||||
public struct PrimitiveComponentInfo
|
||||
{
|
||||
// Token: 0x06004D5E RID: 19806 RVA: 0x0012050C File Offset: 0x0011E70C
|
||||
[Token(Token = "0x6004D5E")]
|
||||
[Address(RVA = "0x2AC7A0", Offset = "0x2ABBA0", VA = "0x1802AC7A0")]
|
||||
public PrimitiveComponentInfo(Vector3 pos, Quaternion rot, Vector3 scale, CKELFEGHFJD materialIndices, int meshIndex, int scalingMode, Vector3 scalingRatio, float authoredBevelRatio)
|
||||
{
|
||||
float z = scale.z;
|
||||
float z2 = pos.z;
|
||||
float4x4 float4x;
|
||||
float4 c = float4x.c1;
|
||||
float4 c2 = float4x.c2;
|
||||
float4 c3 = float4x.c3;
|
||||
this.inverseTranspose = c3;
|
||||
float4 c4 = float4x.c1;
|
||||
float4x4 float4x2;
|
||||
float4 c5 = float4x2.c1;
|
||||
this.inverseTranspose.c2 = c5;
|
||||
float4 c6 = float4x2.c2;
|
||||
this.inverseTranspose.c3 = c6;
|
||||
float4 c7 = float4x2.c3;
|
||||
float z3 = pos.z;
|
||||
this.position = c7;
|
||||
float3 @float;
|
||||
float z4 = @float.z;
|
||||
float z5 = scale.z;
|
||||
float3 float2;
|
||||
float z6 = float2.z;
|
||||
this.scalingRatio = z6;
|
||||
this.scalingRatio.y = z6;
|
||||
this.authoredBevelRatio = z6;
|
||||
float3 float3;
|
||||
float z7 = float3.z;
|
||||
}
|
||||
|
||||
// Token: 0x0400394F RID: 14671
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x400394F")]
|
||||
public float4x4 transform;
|
||||
|
||||
// Token: 0x04003950 RID: 14672
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4003950")]
|
||||
public float4x4 inverseTranspose;
|
||||
|
||||
// Token: 0x04003951 RID: 14673
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x4003951")]
|
||||
public float3 position;
|
||||
|
||||
// Token: 0x04003952 RID: 14674
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8C")]
|
||||
[Token(Token = "0x4003952")]
|
||||
public quaternion rotation;
|
||||
|
||||
// Token: 0x04003953 RID: 14675
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x9C")]
|
||||
[Token(Token = "0x4003953")]
|
||||
public float3 scale;
|
||||
|
||||
// Token: 0x04003954 RID: 14676
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA8")]
|
||||
[Token(Token = "0x4003954")]
|
||||
public CKELFEGHFJD materialIndices;
|
||||
|
||||
// Token: 0x04003955 RID: 14677
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x4003955")]
|
||||
public int scalingMode;
|
||||
|
||||
// Token: 0x04003956 RID: 14678
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB4")]
|
||||
[Token(Token = "0x4003956")]
|
||||
public float3 scalingRatio;
|
||||
|
||||
// Token: 0x04003957 RID: 14679
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC0")]
|
||||
[Token(Token = "0x4003957")]
|
||||
public float authoredBevelRatio;
|
||||
|
||||
// Token: 0x04003958 RID: 14680
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC4")]
|
||||
[Token(Token = "0x4003958")]
|
||||
public int meshIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Collections;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C82 RID: 3202
|
||||
[Token(Token = "0x2000C82")]
|
||||
[StructLayout(3)]
|
||||
public class SubdivideMeshData : IDisposable
|
||||
{
|
||||
// Token: 0x06004D17 RID: 19735 RVA: 0x0011EF7C File Offset: 0x0011D17C
|
||||
[Token(Token = "0x6004D17")]
|
||||
[Address(RVA = "0x22050B0", Offset = "0x2203AB0", VA = "0x1822050B0")]
|
||||
public void InitMemory(int numIndices, Allocator allocator)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D18 RID: 19736 RVA: 0x0011EFBC File Offset: 0x0011D1BC
|
||||
[Token(Token = "0x6004D18")]
|
||||
[Address(RVA = "0x2205000", Offset = "0x2203A00", VA = "0x182205000", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
throw new MissingMethodException();
|
||||
}
|
||||
|
||||
// Token: 0x06004D19 RID: 19737 RVA: 0x0011EFD0 File Offset: 0x0011D1D0
|
||||
[Token(Token = "0x6004D19")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public SubdivideMeshData()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04003910 RID: 14608
|
||||
[Token(Token = "0x4003910")]
|
||||
public static NativeMultiHashMap<int, int> vertexMap;
|
||||
|
||||
// Token: 0x04003911 RID: 14609
|
||||
[Token(Token = "0x4003911")]
|
||||
public static NativeArray<int> indexRemap;
|
||||
|
||||
// Token: 0x04003912 RID: 14610
|
||||
[Token(Token = "0x4003912")]
|
||||
private static int refCount;
|
||||
|
||||
// Token: 0x04003913 RID: 14611
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003913")]
|
||||
public NativeList<int> origIndices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ClusterLOD
|
||||
{
|
||||
// Token: 0x02000C84 RID: 3204
|
||||
[Token(Token = "0x2000C84")]
|
||||
[BurstCompile]
|
||||
[StructLayout(0, Size = 240)]
|
||||
public struct SubdivideMeshJob : IJob
|
||||
{
|
||||
// Token: 0x06004D1C RID: 19740 RVA: 0x0011EFE4 File Offset: 0x0011D1E4
|
||||
[Token(Token = "0x6004D1C")]
|
||||
[Address(RVA = "0x2ACBE0", Offset = "0x2ABFE0", VA = "0x1802ACBE0")]
|
||||
public SubdivideMeshJob(SubdivideMeshData subdiveData, NativeClusterMesh mesh, NativeClusterMesh additionalMesh, float maxEdgeSize, float maxDistance, Vector3 eyePos, float rootScale)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06004D1D RID: 19741 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D1D")]
|
||||
[Address(RVA = "0x2ACB80", Offset = "0x2ABF80", VA = "0x1802ACB80")]
|
||||
private float3 GetVert(int i)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D1E RID: 19742 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D1E")]
|
||||
[Address(RVA = "0x2ACBB0", Offset = "0x2ABFB0", VA = "0x1802ACBB0")]
|
||||
private void SetupVertFromIndex(int i, out float3 newVert, out float3 newNormal, out float4 newTangent, out float4 newMatIdx, out float2 newUV)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D1F RID: 19743 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D1F")]
|
||||
[Address(RVA = "0x2ACB60", Offset = "0x2ABF60", VA = "0x1802ACB60")]
|
||||
private int CreateVert(int i1, int i2)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D20 RID: 19744 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D20")]
|
||||
[Address(RVA = "0x2ACB50", Offset = "0x2ABF50", VA = "0x1802ACB50")]
|
||||
private void AddTriangle(int i1, int i2, int i3)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D21 RID: 19745 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D21")]
|
||||
[Address(RVA = "0x2ACBC0", Offset = "0x2ABFC0", VA = "0x1802ACBC0")]
|
||||
private bool ShouldSplit(int i1, int i2, float splitSizeSq)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D22 RID: 19746 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D22")]
|
||||
[Address(RVA = "0x2ACB30", Offset = "0x2ABF30", VA = "0x1802ACB30")]
|
||||
private bool Add2SideSplitTriangle(int i1, int i2, int i3, float splitSizeSq, bool add)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D23 RID: 19747 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D23")]
|
||||
[Address(RVA = "0x2ACB10", Offset = "0x2ABF10", VA = "0x1802ACB10")]
|
||||
private bool Add1SideSplitTriangle(int i1, int i2, int i3, float splitSizeSq, bool add)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D24 RID: 19748 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D24")]
|
||||
[Address(RVA = "0x2ACBD0", Offset = "0x2ABFD0", VA = "0x1802ACBD0")]
|
||||
private void SwapOrder(int i1, int i2, int i3, out int i1o, out int i2o, out int i3o)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06004D25 RID: 19749 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6004D25")]
|
||||
[Address(RVA = "0x2ACB70", Offset = "0x2ABF70", VA = "0x1802ACB70", Slot = "4")]
|
||||
public void Execute()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x04003916 RID: 14614
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4003916")]
|
||||
[ReadOnly]
|
||||
private NativeList<float3> srcVerts;
|
||||
|
||||
// Token: 0x04003917 RID: 14615
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4003917")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float3> srcNormals;
|
||||
|
||||
// Token: 0x04003918 RID: 14616
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4003918")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float4> srcTangents;
|
||||
|
||||
// Token: 0x04003919 RID: 14617
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4003919")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float2> srcUVs;
|
||||
|
||||
// Token: 0x0400391A RID: 14618
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400391A")]
|
||||
[ReadOnly]
|
||||
private NativeArray<float4> srcMaterialIndices;
|
||||
|
||||
// Token: 0x0400391B RID: 14619
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400391B")]
|
||||
private NativeList<int> origIndices;
|
||||
|
||||
// Token: 0x0400391C RID: 14620
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400391C")]
|
||||
private NativeList<int> srcIndices;
|
||||
|
||||
// Token: 0x0400391D RID: 14621
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400391D")]
|
||||
private NativeList<float3> newVerts;
|
||||
|
||||
// Token: 0x0400391E RID: 14622
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400391E")]
|
||||
private NativeArray<float3> newNormals;
|
||||
|
||||
// Token: 0x0400391F RID: 14623
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x400391F")]
|
||||
private NativeArray<float4> newTangents;
|
||||
|
||||
// Token: 0x04003920 RID: 14624
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x4003920")]
|
||||
private NativeArray<float4> newMaterialIndices;
|
||||
|
||||
// Token: 0x04003921 RID: 14625
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x4003921")]
|
||||
private NativeArray<float2> newUVs;
|
||||
|
||||
// Token: 0x04003922 RID: 14626
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC0")]
|
||||
[Token(Token = "0x4003922")]
|
||||
private NativeList<int> newIndices;
|
||||
|
||||
// Token: 0x04003923 RID: 14627
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xD0")]
|
||||
[Token(Token = "0x4003923")]
|
||||
[ReadOnly]
|
||||
private float maxEdgeSizeSq;
|
||||
|
||||
// Token: 0x04003924 RID: 14628
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xD4")]
|
||||
[Token(Token = "0x4003924")]
|
||||
[ReadOnly]
|
||||
public float maxDistanceSq;
|
||||
|
||||
// Token: 0x04003925 RID: 14629
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xD8")]
|
||||
[Token(Token = "0x4003925")]
|
||||
[ReadOnly]
|
||||
private float3 eyePos;
|
||||
|
||||
// Token: 0x04003926 RID: 14630
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xE4")]
|
||||
[Token(Token = "0x4003926")]
|
||||
[ReadOnly]
|
||||
private float rootScale;
|
||||
|
||||
// Token: 0x04003927 RID: 14631
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xE8")]
|
||||
[Token(Token = "0x4003927")]
|
||||
[ReadOnly]
|
||||
private float maxEdgeSize;
|
||||
|
||||
// Token: 0x04003928 RID: 14632
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xEC")]
|
||||
[Token(Token = "0x4003928")]
|
||||
[ReadOnly]
|
||||
public float maxDistance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user