using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005EB RID: 1515
	[Token(Token = "0x20005EB")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Bloom and Glow/Bloom")]
	[RequireComponent(typeof(Camera))]
	public class Bloom : PostEffectsBase
	{
		// Token: 0x06003168 RID: 12648 RVA: 0x0006A9CC File Offset: 0x00068BCC
		[Token(Token = "0x6003168")]
		[Address(RVA = "0x7B0F30", Offset = "0x7AFF30", VA = "0x1807B0F30", 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: 0x06003169 RID: 12649 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003169")]
		[Address(RVA = "0x7B1030", Offset = "0x7B0030", VA = "0x1807B1030")]
		public void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600316A RID: 12650 RVA: 0x0006AA84 File Offset: 0x00068C84
		[Token(Token = "0x600316A")]
		[Address(RVA = "0x7B08B0", Offset = "0x7AF8B0", VA = "0x1807B08B0")]
		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: 0x0600316B RID: 12651 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600316B")]
		[Address(RVA = "0x7B0990", Offset = "0x7AF990", VA = "0x1807B0990")]
		private void BlendFlares(RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600316C RID: 12652 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600316C")]
		[Address(RVA = "0x7B0D20", Offset = "0x7AFD20", VA = "0x1807B0D20")]
		private void BrightFilter(float thresh, RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600316D RID: 12653 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600316D")]
		[Address(RVA = "0x7B0E30", Offset = "0x7AFE30", VA = "0x1807B0E30")]
		private void BrightFilter(Color threshColor, RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600316E RID: 12654 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600316E")]
		[Address(RVA = "0x7B2280", Offset = "0x7B1280", VA = "0x1807B2280")]
		private void Vignette(float amount, RenderTexture from, RenderTexture to)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600316F RID: 12655 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600316F")]
		[Address(RVA = "0x7B24B0", Offset = "0x7B14B0", VA = "0x1807B24B0")]
		public Bloom()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003A87 RID: 14983
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003A87")]
		public Bloom.TweakMode tweakMode;

		// Token: 0x04003A88 RID: 14984
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003A88")]
		public Bloom.BloomScreenBlendMode screenBlendMode;

		// Token: 0x04003A89 RID: 14985
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003A89")]
		public Bloom.HDRBloomMode hdr;

		// Token: 0x04003A8A RID: 14986
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x4003A8A")]
		private bool doHdr;

		// Token: 0x04003A8B RID: 14987
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003A8B")]
		public float sepBlurSpread;

		// Token: 0x04003A8C RID: 14988
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4003A8C")]
		public Bloom.BloomQuality quality;

		// Token: 0x04003A8D RID: 14989
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003A8D")]
		public float bloomIntensity;

		// Token: 0x04003A8E RID: 14990
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x4003A8E")]
		public float bloomThreshold;

		// Token: 0x04003A8F RID: 14991
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003A8F")]
		public Color bloomThresholdColor;

		// Token: 0x04003A90 RID: 14992
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003A90")]
		public int bloomBlurIterations;

		// Token: 0x04003A91 RID: 14993
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x4003A91")]
		public int hollywoodFlareBlurIterations;

		// Token: 0x04003A92 RID: 14994
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003A92")]
		public float flareRotation;

		// Token: 0x04003A93 RID: 14995
		[FieldOffset(Offset = "0x64")]
		[Token(Token = "0x4003A93")]
		public Bloom.LensFlareStyle lensflareMode;

		// Token: 0x04003A94 RID: 14996
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003A94")]
		public float hollyStretchWidth;

		// Token: 0x04003A95 RID: 14997
		[FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x4003A95")]
		public float lensflareIntensity;

		// Token: 0x04003A96 RID: 14998
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003A96")]
		public float lensflareThreshold;

		// Token: 0x04003A97 RID: 14999
		[FieldOffset(Offset = "0x74")]
		[Token(Token = "0x4003A97")]
		public float lensFlareSaturation;

		// Token: 0x04003A98 RID: 15000
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4003A98")]
		public Color flareColorA;

		// Token: 0x04003A99 RID: 15001
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x4003A99")]
		public Color flareColorB;

		// Token: 0x04003A9A RID: 15002
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x4003A9A")]
		public Color flareColorC;

		// Token: 0x04003A9B RID: 15003
		[FieldOffset(Offset = "0xA8")]
		[Token(Token = "0x4003A9B")]
		public Color flareColorD;

		// Token: 0x04003A9C RID: 15004
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x4003A9C")]
		public Texture2D lensFlareVignetteMask;

		// Token: 0x04003A9D RID: 15005
		[FieldOffset(Offset = "0xC0")]
		[Token(Token = "0x4003A9D")]
		public Shader lensFlareShader;

		// Token: 0x04003A9E RID: 15006
		[FieldOffset(Offset = "0xC8")]
		[Token(Token = "0x4003A9E")]
		private Material lensFlareMaterial;

		// Token: 0x04003A9F RID: 15007
		[FieldOffset(Offset = "0xD0")]
		[Token(Token = "0x4003A9F")]
		public Shader screenBlendShader;

		// Token: 0x04003AA0 RID: 15008
		[FieldOffset(Offset = "0xD8")]
		[Token(Token = "0x4003AA0")]
		private Material screenBlend;

		// Token: 0x04003AA1 RID: 15009
		[FieldOffset(Offset = "0xE0")]
		[Token(Token = "0x4003AA1")]
		public Shader blurAndFlaresShader;

		// Token: 0x04003AA2 RID: 15010
		[FieldOffset(Offset = "0xE8")]
		[Token(Token = "0x4003AA2")]
		private Material blurAndFlaresMaterial;

		// Token: 0x04003AA3 RID: 15011
		[FieldOffset(Offset = "0xF0")]
		[Token(Token = "0x4003AA3")]
		public Shader brightPassFilterShader;

		// Token: 0x04003AA4 RID: 15012
		[FieldOffset(Offset = "0xF8")]
		[Token(Token = "0x4003AA4")]
		private Material brightPassFilterMaterial;

		// Token: 0x020005EC RID: 1516
		[Token(Token = "0x20005EC")]
		public enum LensFlareStyle
		{
			// Token: 0x04003AA6 RID: 15014
			[Token(Token = "0x4003AA6")]
			Ghosting,
			// Token: 0x04003AA7 RID: 15015
			[Token(Token = "0x4003AA7")]
			Anamorphic,
			// Token: 0x04003AA8 RID: 15016
			[Token(Token = "0x4003AA8")]
			Combined
		}

		// Token: 0x020005ED RID: 1517
		[Token(Token = "0x20005ED")]
		public enum TweakMode
		{
			// Token: 0x04003AAA RID: 15018
			[Token(Token = "0x4003AAA")]
			Basic,
			// Token: 0x04003AAB RID: 15019
			[Token(Token = "0x4003AAB")]
			Complex
		}

		// Token: 0x020005EE RID: 1518
		[Token(Token = "0x20005EE")]
		public enum HDRBloomMode
		{
			// Token: 0x04003AAD RID: 15021
			[Token(Token = "0x4003AAD")]
			Auto,
			// Token: 0x04003AAE RID: 15022
			[Token(Token = "0x4003AAE")]
			On,
			// Token: 0x04003AAF RID: 15023
			[Token(Token = "0x4003AAF")]
			Off
		}

		// Token: 0x020005EF RID: 1519
		[Token(Token = "0x20005EF")]
		public enum BloomScreenBlendMode
		{
			// Token: 0x04003AB1 RID: 15025
			[Token(Token = "0x4003AB1")]
			Screen,
			// Token: 0x04003AB2 RID: 15026
			[Token(Token = "0x4003AB2")]
			Add
		}

		// Token: 0x020005F0 RID: 1520
		[Token(Token = "0x20005F0")]
		public enum BloomQuality
		{
			// Token: 0x04003AB4 RID: 15028
			[Token(Token = "0x4003AB4")]
			Cheap,
			// Token: 0x04003AB5 RID: 15029
			[Token(Token = "0x4003AB5")]
			High
		}
	}
}
