using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000626 RID: 1574
	[Token(Token = "0x2000626")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Color Adjustments/Tonemapping")]
	public class Tonemapping : PostEffectsBase
	{
		// Token: 0x06003225 RID: 12837 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003225")]
		[Address(RVA = "0xF5F7D0", Offset = "0xF5E7D0", VA = "0x180F5F7D0", Slot = "4")]
		public override bool CheckResources()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003226 RID: 12838 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003226")]
		[Address(RVA = "0xF60600", Offset = "0xF5F600", VA = "0x180F60600")]
		public float UpdateCurve()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003227 RID: 12839 RVA: 0x0006C2F4 File Offset: 0x0006A4F4
		[Token(Token = "0x6003227")]
		[Address(RVA = "0xF5FA50", Offset = "0xF5EA50", VA = "0x180F5FA50")]
		private void OnDisable()
		{
			if (this.rt)
			{
				UnityEngine.Object.DestroyImmediate(this.rt);
				this.rt = (ulong)0L;
			}
			if (this.tonemapMaterial)
			{
				UnityEngine.Object.DestroyImmediate(this.tonemapMaterial);
				this.tonemapMaterial = (ulong)0L;
			}
			Texture2D texture2D = this.curveTex;
			if (texture2D)
			{
				UnityEngine.Object.DestroyImmediate(texture2D);
			}
		}

		// Token: 0x06003228 RID: 12840 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003228")]
		[Address(RVA = "0xF5F930", Offset = "0xF5E930", VA = "0x180F5F930")]
		private bool CreateInternalRenderTexture()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003229 RID: 12841 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003229")]
		[Address(RVA = "0xF5FBE0", Offset = "0xF5EBE0", VA = "0x180F5FBE0")]
		[ImageEffectTransformsToLDR]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600322A RID: 12842 RVA: 0x0006C35C File Offset: 0x0006A55C
		[Token(Token = "0x600322A")]
		[Address(RVA = "0xF60930", Offset = "0xF5F930", VA = "0x180F60930")]
		public Tonemapping()
		{
		}

		// Token: 0x04003C53 RID: 15443
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003C53")]
		public Tonemapping.TonemapperType type = (Tonemapping.TonemapperType)((ulong)3L);

		// Token: 0x04003C54 RID: 15444
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003C54")]
		public Tonemapping.AdaptiveTexSize adaptiveTextureSize = (Tonemapping.AdaptiveTexSize)((ulong)256L);

		// Token: 0x04003C55 RID: 15445
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003C55")]
		public AnimationCurve remapCurve;

		// Token: 0x04003C56 RID: 15446
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003C56")]
		private Texture2D curveTex;

		// Token: 0x04003C57 RID: 15447
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003C57")]
		public float exposureAdjustment = 1.5f;

		// Token: 0x04003C58 RID: 15448
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x4003C58")]
		public float middleGrey = 0.4f;

		// Token: 0x04003C59 RID: 15449
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003C59")]
		public float white = 2f;

		// Token: 0x04003C5A RID: 15450
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4003C5A")]
		public float adaptionSpeed = 1.5f;

		// Token: 0x04003C5B RID: 15451
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003C5B")]
		public Shader tonemapper;

		// Token: 0x04003C5C RID: 15452
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003C5C")]
		public bool validRenderTextureFormat = true;

		// Token: 0x04003C5D RID: 15453
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003C5D")]
		private Material tonemapMaterial;

		// Token: 0x04003C5E RID: 15454
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003C5E")]
		private RenderTexture rt;

		// Token: 0x04003C5F RID: 15455
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003C5F")]
		private RenderTextureFormat rtFormat = (RenderTextureFormat)((ulong)2L);

		// Token: 0x02000627 RID: 1575
		[Token(Token = "0x2000627")]
		public enum TonemapperType
		{
			// Token: 0x04003C61 RID: 15457
			[Token(Token = "0x4003C61")]
			SimpleReinhard,
			// Token: 0x04003C62 RID: 15458
			[Token(Token = "0x4003C62")]
			UserCurve,
			// Token: 0x04003C63 RID: 15459
			[Token(Token = "0x4003C63")]
			Hable,
			// Token: 0x04003C64 RID: 15460
			[Token(Token = "0x4003C64")]
			Photographic,
			// Token: 0x04003C65 RID: 15461
			[Token(Token = "0x4003C65")]
			OptimizedHejiDawson,
			// Token: 0x04003C66 RID: 15462
			[Token(Token = "0x4003C66")]
			AdaptiveReinhard,
			// Token: 0x04003C67 RID: 15463
			[Token(Token = "0x4003C67")]
			AdaptiveReinhardAutoWhite
		}

		// Token: 0x02000628 RID: 1576
		[Token(Token = "0x2000628")]
		public enum AdaptiveTexSize
		{
			// Token: 0x04003C69 RID: 15465
			[Token(Token = "0x4003C69")]
			Square16 = 16,
			// Token: 0x04003C6A RID: 15466
			[Token(Token = "0x4003C6A")]
			Square32 = 32,
			// Token: 0x04003C6B RID: 15467
			[Token(Token = "0x4003C6B")]
			Square64 = 64,
			// Token: 0x04003C6C RID: 15468
			[Token(Token = "0x4003C6C")]
			Square128 = 128,
			// Token: 0x04003C6D RID: 15469
			[Token(Token = "0x4003C6D")]
			Square256 = 256,
			// Token: 0x04003C6E RID: 15470
			[Token(Token = "0x4003C6E")]
			Square512 = 512,
			// Token: 0x04003C6F RID: 15471
			[Token(Token = "0x4003C6F")]
			Square1024 = 1024
		}
	}
}
