using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005A8 RID: 1448
	[Token(Token = "0x20005A8")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Color Adjustments/Color Correction (3D Lookup Texture)")]
	public class ColorCorrectionLookup : PostEffectsBase
	{
		// Token: 0x06002ED1 RID: 11985 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002ED1")]
		[Address(RVA = "0xE8B110", Offset = "0xE89F10", VA = "0x180E8B110", Slot = "4")]
		public override bool CheckResources()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002ED2 RID: 11986 RVA: 0x00063E9C File Offset: 0x0006209C
		[Token(Token = "0x6002ED2")]
		[Address(RVA = "0xE8B670", Offset = "0xE8A470", VA = "0x180E8B670")]
		private void OnDisable()
		{
			if (this.material)
			{
				UnityEngine.Object.DestroyImmediate(this.material);
				this.material = (ulong)0L;
			}
		}

		// Token: 0x06002ED3 RID: 11987 RVA: 0x00063ECC File Offset: 0x000620CC
		[Token(Token = "0x6002ED3")]
		[Address(RVA = "0xE8B5C0", Offset = "0xE8A3C0", VA = "0x180E8B5C0")]
		private void OnDestroy()
		{
			/*
An exception occurred when decompiling this method (06002ED3)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void UnityStandardAssets.ImageEffects.ColorCorrectionLookup::OnDestroy()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	IL_19:; 	stfld:Texture3D(ColorCorrectionLookup::converted3DLut, ldloc:ColorCorrectionLookup(this), conv.u8:uint64[exp:Texture3D](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: 0x06002ED4 RID: 11988 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002ED4")]
		[Address(RVA = "0xE8B950", Offset = "0xE8A750", VA = "0x180E8B950")]
		public void SetIdentityLut()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002ED5 RID: 11989 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002ED5")]
		[Address(RVA = "0xE8BBD0", Offset = "0xE8A9D0", VA = "0x180E8BBD0")]
		public bool ValidDimensions(Texture2D tex2d)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002ED6 RID: 11990 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002ED6")]
		[Address(RVA = "0xE8B180", Offset = "0xE89F80", VA = "0x180E8B180")]
		public void Convert(Texture2D temp2DTex, string path)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002ED7 RID: 11991 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002ED7")]
		[Address(RVA = "0xE8B720", Offset = "0xE8A520", VA = "0x180E8B720")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002ED8 RID: 11992 RVA: 0x00063EFC File Offset: 0x000620FC
		[Token(Token = "0x6002ED8")]
		[Address(RVA = "0xE8BCA0", Offset = "0xE8AAA0", VA = "0x180E8BCA0")]
		public ColorCorrectionLookup()
		{
		}

		// Token: 0x04003858 RID: 14424
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003858")]
		public Shader shader;

		// Token: 0x04003859 RID: 14425
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003859")]
		private Material material;

		// Token: 0x0400385A RID: 14426
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x400385A")]
		public Texture3D converted3DLut;

		// Token: 0x0400385B RID: 14427
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x400385B")]
		public string basedOnTempTex = "";
	}
}
