Files
NobetaSource/Cpp2IL/Assembly-CSharp/UnityStandardAssets/ImageEffects/ScreenSpaceAmbientObscurance.cs
2023-09-06 22:00:49 +02:00

116 lines
5.4 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
namespace UnityStandardAssets.ImageEffects
{
// Token: 0x020005C4 RID: 1476
[Token(Token = "0x20005C4")]
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
[AddComponentMenu("Image Effects/Rendering/Screen Space Ambient Obscurance")]
internal class ScreenSpaceAmbientObscurance : PostEffectsBase
{
// Token: 0x06002F48 RID: 12104 RVA: 0x00064D34 File Offset: 0x00062F34
[Token(Token = "0x6002F48")]
[Address(RVA = "0x43A430", Offset = "0x439230", VA = "0x18043A430", Slot = "4")]
public override bool CheckResources()
{
bool flag = base.CheckSupport(true);
Material material = this.aoMaterial;
Shader shader = this.aoShader;
Material material2 = base.CheckShaderAndCreateMaterial(shader, material);
this.aoMaterial = material2;
bool isSupported = this.isSupported;
if (!isSupported)
{
base.ReportAutoDisable();
}
return isSupported;
}
// Token: 0x06002F49 RID: 12105 RVA: 0x00064D7C File Offset: 0x00062F7C
[Token(Token = "0x6002F49")]
[Address(RVA = "0x43A490", Offset = "0x439290", VA = "0x18043A490")]
private void OnDisable()
{
/*
An exception occurred when decompiling this method (06002F49)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void UnityStandardAssets.ImageEffects.ScreenSpaceAmbientObscurance::OnDisable()
---> System.Exception: Basic block has to end with unconditional control flow.
{; IL_19:; stfld:Material(ScreenSpaceAmbientObscurance::aoMaterial, ldloc:ScreenSpaceAmbientObscurance(this), conv.u8:uint64[exp:Material](ldc.i8:int64[exp:uint64](0))); };
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: 0x06002F4A RID: 12106 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002F4A")]
[Address(RVA = "0x43A540", Offset = "0x439340", VA = "0x18043A540")]
[ImageEffectOpaque]
private void OnRenderImage(RenderTexture source, RenderTexture destination)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002F4B RID: 12107 RVA: 0x00064DAC File Offset: 0x00062FAC
[Token(Token = "0x6002F4B")]
[Address(RVA = "0x43AEF0", Offset = "0x439CF0", VA = "0x18043AEF0")]
public ScreenSpaceAmbientObscurance()
{
}
// Token: 0x0400392E RID: 14638
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x400392E")]
[Range(0f, 3f)]
public float intensity = 0.5f;
// Token: 0x0400392F RID: 14639
[FieldOffset(Offset = "0x2C")]
[Token(Token = "0x400392F")]
[Range(0.1f, 3f)]
public float radius = 0.2f;
// Token: 0x04003930 RID: 14640
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4003930")]
[Range(0f, 3f)]
public int blurIterations = (int)((ulong)1L);
// Token: 0x04003931 RID: 14641
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x4003931")]
[Range(0f, 5f)]
public float blurFilterDistance = 1.25f;
// Token: 0x04003932 RID: 14642
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4003932")]
[Range(0f, 1f)]
public int downsample;
// Token: 0x04003933 RID: 14643
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x4003933")]
public Texture2D rand;
// Token: 0x04003934 RID: 14644
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4003934")]
public Shader aoShader;
// Token: 0x04003935 RID: 14645
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4003935")]
private Material aoMaterial;
}
}