134 lines
6.0 KiB
C#
134 lines
6.0 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
using UnityEngine.Rendering;
|
|
|
|
namespace Obi
|
|
{
|
|
// Token: 0x02000492 RID: 1170
|
|
[Token(Token = "0x2000492")]
|
|
public class ShadowmapExposer : MonoBehaviour
|
|
{
|
|
// Token: 0x06002955 RID: 10581 RVA: 0x0005AA7C File Offset: 0x00058C7C
|
|
[Token(Token = "0x6002955")]
|
|
[Address(RVA = "0x11C4440", Offset = "0x11C2C40", VA = "0x1811C4440")]
|
|
public void Awake()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06002955)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Obi.ShadowmapExposer::Awake()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{; Block_0:; stloc:Light(var_0_06, call:Light(Component::GetComponent, ldloc:ShadowmapExposer[exp:Component](this))); stfld:Light(ShadowmapExposer::light, ldloc:ShadowmapExposer(this), ldloc:Light(var_0_06)); };
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
|
|
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 344
|
|
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 1618
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06002956 RID: 10582 RVA: 0x0005AA98 File Offset: 0x00058C98
|
|
[Token(Token = "0x6002956")]
|
|
[Address(RVA = "0x11C44E0", Offset = "0x11C2CE0", VA = "0x1811C44E0")]
|
|
public void OnEnable()
|
|
{
|
|
CommandBuffer commandBuffer = this.afterShadow;
|
|
if (commandBuffer != 0)
|
|
{
|
|
this.light.RemoveCommandBuffer(LightEvent.AfterShadowMapPass, commandBuffer);
|
|
this.afterShadow = (ulong)0L;
|
|
}
|
|
CommandBuffer commandBuffer2 = new CommandBuffer();
|
|
this.afterShadow = commandBuffer2;
|
|
this.afterShadow.name = "FluidShadows";
|
|
Light light = this.light;
|
|
CommandBuffer commandBuffer3 = this.afterShadow;
|
|
light.AddCommandBuffer(LightEvent.AfterShadowMapPass, commandBuffer3);
|
|
}
|
|
|
|
// Token: 0x06002957 RID: 10583 RVA: 0x0005AB00 File Offset: 0x00058D00
|
|
[Token(Token = "0x6002957")]
|
|
[Address(RVA = "0x11C4490", Offset = "0x11C2C90", VA = "0x1811C4490")]
|
|
public void OnDisable()
|
|
{
|
|
CommandBuffer commandBuffer = this.afterShadow;
|
|
if (commandBuffer != 0)
|
|
{
|
|
this.light.RemoveCommandBuffer(LightEvent.AfterShadowMapPass, commandBuffer);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002958 RID: 10584 RVA: 0x0005AB2C File Offset: 0x00058D2C
|
|
[Token(Token = "0x6002958")]
|
|
[Address(RVA = "0x11C4490", Offset = "0x11C2C90", VA = "0x1811C4490")]
|
|
private void Cleanup()
|
|
{
|
|
CommandBuffer commandBuffer = this.afterShadow;
|
|
if (commandBuffer != 0)
|
|
{
|
|
this.light.RemoveCommandBuffer(LightEvent.AfterShadowMapPass, commandBuffer);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002959 RID: 10585 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002959")]
|
|
[Address(RVA = "0x11C45C0", Offset = "0x11C2DC0", VA = "0x1811C45C0")]
|
|
public void SetupFluidShadowsCommandBuffer()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600295A RID: 10586 RVA: 0x0005AB58 File Offset: 0x00058D58
|
|
[Token(Token = "0x600295A")]
|
|
[Address(RVA = "0x11C4830", Offset = "0x11C3030", VA = "0x1811C4830")]
|
|
private void Update()
|
|
{
|
|
if (base.gameObject.activeInHierarchy && base.enabled)
|
|
{
|
|
ObiParticleRenderer[] array = this.particleRenderers;
|
|
if (array != 0 && array.Length != 0)
|
|
{
|
|
if (this.afterShadow != (ulong)0L)
|
|
{
|
|
this.SetupFluidShadowsCommandBuffer();
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
CommandBuffer commandBuffer = this.afterShadow;
|
|
while (commandBuffer == 0)
|
|
{
|
|
}
|
|
this.light.RemoveCommandBuffer(LightEvent.AfterShadowMapPass, commandBuffer);
|
|
this.afterShadow = (ulong)0L;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600295B RID: 10587 RVA: 0x0005ABC8 File Offset: 0x00058DC8
|
|
[Token(Token = "0x600295B")]
|
|
[Address(RVA = "0x33E460", Offset = "0x33CC60", VA = "0x18033E460")]
|
|
public ShadowmapExposer()
|
|
{
|
|
}
|
|
|
|
// Token: 0x040032B4 RID: 12980
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40032B4")]
|
|
private Light light;
|
|
|
|
// Token: 0x040032B5 RID: 12981
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40032B5")]
|
|
private CommandBuffer afterShadow;
|
|
|
|
// Token: 0x040032B6 RID: 12982
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40032B6")]
|
|
public ObiParticleRenderer[] particleRenderers;
|
|
}
|
|
}
|