using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000593 RID: 1427
	[Token(Token = "0x2000593")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Bloom and Glow/Bloom")]
	public class Bloom : PostEffectsBase
	{
		// Token: 0x06002E9F RID: 11935 RVA: 0x00063710 File Offset: 0x00061910
		[Token(Token = "0x6002E9F")]
		[Address(RVA = "0x8E28A0", Offset = "0x8E16A0", VA = "0x1808E28A0", Slot = "4")]
		public override bool CheckResources()
		{
			int num = 0;
			bool flag = base.CheckSupport(num != 0);
			Material material = this.screenBlend;
			Shader shader = this.screenBlendShader;
			Material material2 = base.CheckShaderAndCreateMaterial(shader, material);
			this.screenBlend = material2;
			Material material3 = this.lensFlareMaterial;
			Shader shader2 = this.lensFlareShader;
			Material material4 = base.CheckShaderAndCreateMaterial(shader2, material3);
			this.lensFlareMaterial = material4;
			Material material5 = this.blurAndFlaresMaterial;
			Shader shader3 = this.blurAndFlaresShader;
			Material material6 = base.CheckShaderAndCreateMaterial(shader3, material5);
			this.blurAndFlaresMaterial = material6;
			Material material7 = this.brightPassFilterMaterial;
			Shader shader4 = this.brightPassFilterShader;
			Material material8 = base.CheckShaderAndCreateMaterial(shader4, material7);
			this.brightPassFilterMaterial = material8;
			bool isSupported = this.isSupported;
			if (!isSupported)
			{
				base.ReportAutoDisable();
			}
			return isSupported;
		}

		// Token: 0x06002EA0 RID: 11936 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EA0")]
		[Address(RVA = "0x8E29A0", Offset = "0x8E17A0", VA = "0x1808E29A0")]
		public void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EA1 RID: 11937 RVA: 0x000637C8 File Offset: 0x000619C8
		[Token(Token = "0x6002EA1")]
		[Address(RVA = "0x8E2220", Offset = "0x8E1020", VA = "0x1808E2220")]
		private void AddTo(float intensity_, RenderTexture from, RenderTexture to)
		{
			this.screenBlend.SetFloat("_Intensity", intensity_);
			to.MarkRestoreExpected();
			Material material = this.screenBlend;
			Graphics.Blit(from, to, material, 9);
		}

		// Token: 0x06002EA2 RID: 11938 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EA2")]
		[Address(RVA = "0x8E2300", Offset = "0x8E1100", VA = "0x1808E2300")]
		private void BlendFlares(RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EA3 RID: 11939 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EA3")]
		[Address(RVA = "0x8E2690", Offset = "0x8E1490", VA = "0x1808E2690")]
		private void BrightFilter(float thresh, RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EA4 RID: 11940 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EA4")]
		[Address(RVA = "0x8E27A0", Offset = "0x8E15A0", VA = "0x1808E27A0")]
		private void BrightFilter(Color threshColor, RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EA5 RID: 11941 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EA5")]
		[Address(RVA = "0x8E3BF0", Offset = "0x8E29F0", VA = "0x1808E3BF0")]
		private void Vignette(float amount, RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EA6 RID: 11942 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EA6")]
		[Address(RVA = "0x8E3E20", Offset = "0x8E2C20", VA = "0x1808E3E20")]
		public Bloom()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0400379D RID: 14237
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400379D")]
		public Bloom.TweakMode tweakMode;

		// Token: 0x0400379E RID: 14238
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x400379E")]
		public Bloom.BloomScreenBlendMode screenBlendMode;

		// Token: 0x0400379F RID: 14239
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400379F")]
		public Bloom.HDRBloomMode hdr;

		// Token: 0x040037A0 RID: 14240
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x40037A0")]
		private bool doHdr;

		// Token: 0x040037A1 RID: 14241
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40037A1")]
		public float sepBlurSpread;

		// Token: 0x040037A2 RID: 14242
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x40037A2")]
		public Bloom.BloomQuality quality;

		// Token: 0x040037A3 RID: 14243
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40037A3")]
		public float bloomIntensity;

		// Token: 0x040037A4 RID: 14244
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x40037A4")]
		public float bloomThreshold;

		// Token: 0x040037A5 RID: 14245
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40037A5")]
		public Color bloomThresholdColor;

		// Token: 0x040037A6 RID: 14246
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x40037A6")]
		public int bloomBlurIterations;

		// Token: 0x040037A7 RID: 14247
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x40037A7")]
		public int hollywoodFlareBlurIterations;

		// Token: 0x040037A8 RID: 14248
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x40037A8")]
		public float flareRotation;

		// Token: 0x040037A9 RID: 14249
		[FieldOffset(Offset = "0x64")]
		[Token(Token = "0x40037A9")]
		public Bloom.LensFlareStyle lensflareMode;

		// Token: 0x040037AA RID: 14250
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x40037AA")]
		public float hollyStretchWidth;

		// Token: 0x040037AB RID: 14251
		[FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x40037AB")]
		public float lensflareIntensity;

		// Token: 0x040037AC RID: 14252
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x40037AC")]
		public float lensflareThreshold;

		// Token: 0x040037AD RID: 14253
		[FieldOffset(Offset = "0x74")]
		[Token(Token = "0x40037AD")]
		public float lensFlareSaturation;

		// Token: 0x040037AE RID: 14254
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x40037AE")]
		public Color flareColorA;

		// Token: 0x040037AF RID: 14255
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x40037AF")]
		public Color flareColorB;

		// Token: 0x040037B0 RID: 14256
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x40037B0")]
		public Color flareColorC;

		// Token: 0x040037B1 RID: 14257
		[FieldOffset(Offset = "0xA8")]
		[Token(Token = "0x40037B1")]
		public Color flareColorD;

		// Token: 0x040037B2 RID: 14258
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x40037B2")]
		public Texture2D lensFlareVignetteMask;

		// Token: 0x040037B3 RID: 14259
		[FieldOffset(Offset = "0xC0")]
		[Token(Token = "0x40037B3")]
		public Shader lensFlareShader;

		// Token: 0x040037B4 RID: 14260
		[FieldOffset(Offset = "0xC8")]
		[Token(Token = "0x40037B4")]
		private Material lensFlareMaterial;

		// Token: 0x040037B5 RID: 14261
		[FieldOffset(Offset = "0xD0")]
		[Token(Token = "0x40037B5")]
		public Shader screenBlendShader;

		// Token: 0x040037B6 RID: 14262
		[FieldOffset(Offset = "0xD8")]
		[Token(Token = "0x40037B6")]
		private Material screenBlend;

		// Token: 0x040037B7 RID: 14263
		[FieldOffset(Offset = "0xE0")]
		[Token(Token = "0x40037B7")]
		public Shader blurAndFlaresShader;

		// Token: 0x040037B8 RID: 14264
		[FieldOffset(Offset = "0xE8")]
		[Token(Token = "0x40037B8")]
		private Material blurAndFlaresMaterial;

		// Token: 0x040037B9 RID: 14265
		[FieldOffset(Offset = "0xF0")]
		[Token(Token = "0x40037B9")]
		public Shader brightPassFilterShader;

		// Token: 0x040037BA RID: 14266
		[FieldOffset(Offset = "0xF8")]
		[Token(Token = "0x40037BA")]
		private Material brightPassFilterMaterial;

		// Token: 0x02000594 RID: 1428
		[Token(Token = "0x2000594")]
		public enum LensFlareStyle
		{
			// Token: 0x040037BC RID: 14268
			[Token(Token = "0x40037BC")]
			Ghosting,
			// Token: 0x040037BD RID: 14269
			[Token(Token = "0x40037BD")]
			Anamorphic,
			// Token: 0x040037BE RID: 14270
			[Token(Token = "0x40037BE")]
			Combined
		}

		// Token: 0x02000595 RID: 1429
		[Token(Token = "0x2000595")]
		public enum TweakMode
		{
			// Token: 0x040037C0 RID: 14272
			[Token(Token = "0x40037C0")]
			Basic,
			// Token: 0x040037C1 RID: 14273
			[Token(Token = "0x40037C1")]
			Complex
		}

		// Token: 0x02000596 RID: 1430
		[Token(Token = "0x2000596")]
		public enum HDRBloomMode
		{
			// Token: 0x040037C3 RID: 14275
			[Token(Token = "0x40037C3")]
			Auto,
			// Token: 0x040037C4 RID: 14276
			[Token(Token = "0x40037C4")]
			On,
			// Token: 0x040037C5 RID: 14277
			[Token(Token = "0x40037C5")]
			Off
		}

		// Token: 0x02000597 RID: 1431
		[Token(Token = "0x2000597")]
		public enum BloomScreenBlendMode
		{
			// Token: 0x040037C7 RID: 14279
			[Token(Token = "0x40037C7")]
			Screen,
			// Token: 0x040037C8 RID: 14280
			[Token(Token = "0x40037C8")]
			Add
		}

		// Token: 0x02000598 RID: 1432
		[Token(Token = "0x2000598")]
		public enum BloomQuality
		{
			// Token: 0x040037CA RID: 14282
			[Token(Token = "0x40037CA")]
			Cheap,
			// Token: 0x040037CB RID: 14283
			[Token(Token = "0x40037CB")]
			High
		}
	}
}
