Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/ClusterLOD/SubdivideMeshJob.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

298 lines
11 KiB
C#

using System;
using Cpp2IlInjected;
using Unity.Burst;
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
namespace ClusterLOD
{
// Token: 0x0200134C RID: 4940
[Token(Token = "0x200134C")]
[BurstCompile]
public struct SubdivideMeshJob : IJob
{
// Token: 0x06006ED5 RID: 28373 RVA: 0x001856EC File Offset: 0x001838EC
[Token(Token = "0x6006ED5")]
[Address(RVA = "0x1F4E2D0", Offset = "0x1F4D2D0", VA = "0x181F4E2D0")]
public SubdivideMeshJob(SubdivideMeshData subdiveData, PCIKHFEIHGO mesh, PCIKHFEIHGO additionalMesh, float maxEdgeSize, float maxDistance, Vector3 eyePos, float rootScale)
{
NativeList<float3> ddpnlakckdp = mesh.DDPNLAKCKDP;
this.srcVerts = ddpnlakckdp;
NativeArray<float3> cdpiecocian = mesh.CDPIECOCIAN;
this.srcNormals = cdpiecocian;
NativeArray<float4> nmfapcbmggf = mesh.NMFAPCBMGGF;
this.srcTangents = nmfapcbmggf;
NativeArray<float2> maeaklfbpmo = mesh.MAEAKLFBPMO;
this.srcUVs = maeaklfbpmo;
NativeArray<float4> pjnfmocjcal = mesh.PJNFMOCJCAL;
this.srcMaterialIndices = pjnfmocjcal;
NativeList<int> elflbeckfef = mesh.ELFLBECKFEF;
this.srcIndices = elflbeckfef;
NativeList<int> nativeList = subdiveData.origIndices;
this.origIndices = nativeList;
NativeList<float3> ddpnlakckdp2 = additionalMesh.DDPNLAKCKDP;
this.newVerts = ddpnlakckdp2;
NativeArray<float3> cdpiecocian2 = additionalMesh.CDPIECOCIAN;
this.maxEdgeSize = (float)0;
this.newNormals = cdpiecocian2;
NativeArray<float4> nmfapcbmggf2 = additionalMesh.NMFAPCBMGGF;
this.newTangents = nmfapcbmggf2;
NativeArray<float4> pjnfmocjcal2 = additionalMesh.PJNFMOCJCAL;
this.maxEdgeSizeSq = (float)0;
this.newMaterialIndices = pjnfmocjcal2;
NativeArray<float2> maeaklfbpmo2 = additionalMesh.MAEAKLFBPMO;
this.newUVs = maeaklfbpmo2;
NativeList<int> elflbeckfef2 = additionalMesh.ELFLBECKFEF;
this.newIndices = elflbeckfef2;
this.maxDistance = (float)0;
this.maxDistanceSq = (float)0;
float3 @float;
float z = @float.z;
this.rootScale = (float)0;
this.eyePos.z = z;
}
// Token: 0x06006ED6 RID: 28374 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6006ED6")]
[Address(RVA = "0x1F4DEA0", Offset = "0x1F4CEA0", VA = "0x181F4DEA0")]
private float3 GetVert(int i)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06006ED7 RID: 28375 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6006ED7")]
[Address(RVA = "0x1F4DF40", Offset = "0x1F4CF40", VA = "0x181F4DF40")]
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: 0x06006ED8 RID: 28376 RVA: 0x00185800 File Offset: 0x00183A00
[Token(Token = "0x6006ED8")]
[Address(RVA = "0x1F4D170", Offset = "0x1F4C170", VA = "0x181F4D170")]
private int CreateVert(int i1, int i2)
{
int num = 0;
NativeArray<float3> nativeArray = this.newNormals;
int num3;
int num2 = num3 - 1;
nativeArray.m_Length = num;
bool flag;
if (flag)
{
this.newTangents.m_Buffer = num;
}
NativeArray<float4> nativeArray2 = this.newMaterialIndices;
this.newUVs.m_Buffer = num;
int num4;
num4 += num2;
return num4;
}
// Token: 0x06006ED9 RID: 28377 RVA: 0x00185854 File Offset: 0x00183A54
[Token(Token = "0x6006ED9")]
[Address(RVA = "0x1F4CF70", Offset = "0x1F4BF70", VA = "0x181F4CF70")]
private void AddTriangle(int i1, int i2, int i3)
{
float3 @float;
float z = @float.z;
float3 float2;
float z2 = float2.z;
float3 float3;
float z3 = float3.z;
}
// Token: 0x06006EDA RID: 28378 RVA: 0x00185878 File Offset: 0x00183A78
[Token(Token = "0x6006EDA")]
[Address(RVA = "0x1F4E120", Offset = "0x1F4D120", VA = "0x181F4E120")]
private bool ShouldSplit(int i1, int i2, float splitSizeSq)
{
/*
An exception occurred when decompiling this method (06006EDA)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ClusterLOD.SubdivideMeshJob::ShouldSplit(System.Int32,System.Int32,System.Single)
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:float32(var_1_06, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](var_0)))
stloc:float32(var_3_0D, ldfld:float32(float3::z, ldloc:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](var_2)))
stloc:float32(var_4_19, ldfld:float32(float3::z, ldfld:float3[exp:valuetype [Unity.Mathematics]Unity.Mathematics.float3&](SubdivideMeshJob::eyePos, ldloc:valuetype ClusterLOD.SubdivideMeshJob&(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: 0x06006EDB RID: 28379 RVA: 0x001858A4 File Offset: 0x00183AA4
[Token(Token = "0x6006EDB")]
[Address(RVA = "0x1F4CEB0", Offset = "0x1F4BEB0", VA = "0x181F4CEB0")]
private bool Add2SideSplitTriangle(int i1, int i2, int i3, float splitSizeSq, bool add)
{
bool flag;
if (!flag)
{
this.AddTriangle(i1, i2, i3);
}
int num = this.CreateVert(i1, i2);
this.AddTriangle(i1, i2, i3);
this.AddTriangle(i1, i2, i3);
return true;
}
// Token: 0x06006EDC RID: 28380 RVA: 0x001858DC File Offset: 0x00183ADC
[Token(Token = "0x6006EDC")]
[Address(RVA = "0x1F4CC50", Offset = "0x1F4BC50", VA = "0x181F4CC50")]
private bool Add1SideSplitTriangle(int i1, int i2, int i3, float splitSizeSq, bool add)
{
bool flag;
if (!flag)
{
}
bool flag2;
if (flag2)
{
float3 @float;
float z = @float.z;
float3 float2;
float z2 = float2.z;
float3 float3;
float z3 = float3.z;
int num = this.CreateVert(i3, i2);
}
int num2 = this.CreateVert(i1, i2);
return true;
}
// Token: 0x06006EDD RID: 28381 RVA: 0x00185924 File Offset: 0x00183B24
[Token(Token = "0x6006EDD")]
[Address(RVA = "0x1F4E2B0", Offset = "0x1F4D2B0", VA = "0x181F4E2B0")]
private void SwapOrder(int i1, int i2, int i3, out int i1o, out int i2o, out int i3o)
{
}
// Token: 0x06006EDE RID: 28382 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6006EDE")]
[Address(RVA = "0x1F4D540", Offset = "0x1F4C540", VA = "0x181F4D540", Slot = "4")]
public void Execute()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x04004949 RID: 18761
[FieldOffset(Offset = "0x0")]
[Token(Token = "0x4004949")]
[ReadOnly]
private NativeList<float3> srcVerts;
// Token: 0x0400494A RID: 18762
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x400494A")]
[ReadOnly]
private NativeArray<float3> srcNormals;
// Token: 0x0400494B RID: 18763
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400494B")]
[ReadOnly]
private NativeArray<float4> srcTangents;
// Token: 0x0400494C RID: 18764
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x400494C")]
[ReadOnly]
private NativeArray<float2> srcUVs;
// Token: 0x0400494D RID: 18765
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x400494D")]
[ReadOnly]
private NativeArray<float4> srcMaterialIndices;
// Token: 0x0400494E RID: 18766
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x400494E")]
private NativeList<int> origIndices;
// Token: 0x0400494F RID: 18767
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x400494F")]
private NativeList<int> srcIndices;
// Token: 0x04004950 RID: 18768
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x4004950")]
private NativeList<float3> newVerts;
// Token: 0x04004951 RID: 18769
[FieldOffset(Offset = "0x80")]
[Token(Token = "0x4004951")]
private NativeArray<float3> newNormals;
// Token: 0x04004952 RID: 18770
[FieldOffset(Offset = "0x90")]
[Token(Token = "0x4004952")]
private NativeArray<float4> newTangents;
// Token: 0x04004953 RID: 18771
[FieldOffset(Offset = "0xA0")]
[Token(Token = "0x4004953")]
private NativeArray<float4> newMaterialIndices;
// Token: 0x04004954 RID: 18772
[FieldOffset(Offset = "0xB0")]
[Token(Token = "0x4004954")]
private NativeArray<float2> newUVs;
// Token: 0x04004955 RID: 18773
[FieldOffset(Offset = "0xC0")]
[Token(Token = "0x4004955")]
private NativeList<int> newIndices;
// Token: 0x04004956 RID: 18774
[FieldOffset(Offset = "0xD0")]
[Token(Token = "0x4004956")]
[ReadOnly]
private float maxEdgeSizeSq;
// Token: 0x04004957 RID: 18775
[FieldOffset(Offset = "0xD4")]
[Token(Token = "0x4004957")]
[ReadOnly]
public float maxDistanceSq;
// Token: 0x04004958 RID: 18776
[FieldOffset(Offset = "0xD8")]
[Token(Token = "0x4004958")]
[ReadOnly]
private float3 eyePos;
// Token: 0x04004959 RID: 18777
[FieldOffset(Offset = "0xE4")]
[Token(Token = "0x4004959")]
[ReadOnly]
private float rootScale;
// Token: 0x0400495A RID: 18778
[FieldOffset(Offset = "0xE8")]
[Token(Token = "0x400495A")]
[ReadOnly]
private float maxEdgeSize;
// Token: 0x0400495B RID: 18779
[FieldOffset(Offset = "0xEC")]
[Token(Token = "0x400495B")]
[ReadOnly]
public float maxDistance;
}
}