using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x0200062B RID: 1579
	[Token(Token = "0x200062B")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Camera/Vignette and Chromatic Aberration")]
	public class VignetteAndChromaticAberration : PostEffectsBase
	{
		// Token: 0x06003233 RID: 12851 RVA: 0x0006C430 File Offset: 0x0006A630
		[Token(Token = "0x6003233")]
		[Address(RVA = "0x4B10A0", Offset = "0x4B00A0", VA = "0x1804B10A0", Slot = "4")]
		public override bool CheckResources()
		{
			int num = 0;
			bool flag = base.CheckSupport(num != 0);
			Material vignetteMaterial = this.m_VignetteMaterial;
			Shader shader = this.vignetteShader;
			Material material = base.CheckShaderAndCreateMaterial(shader, vignetteMaterial);
			this.m_VignetteMaterial = material;
			Material separableBlurMaterial = this.m_SeparableBlurMaterial;
			Shader shader2 = this.separableBlurShader;
			Material material2 = base.CheckShaderAndCreateMaterial(shader2, separableBlurMaterial);
			this.m_SeparableBlurMaterial = material2;
			Material chromAberrationMaterial = this.m_ChromAberrationMaterial;
			Shader shader3 = this.chromAberrationShader;
			Material material3 = base.CheckShaderAndCreateMaterial(shader3, chromAberrationMaterial);
			this.m_ChromAberrationMaterial = material3;
			bool isSupported = this.isSupported;
			if (!isSupported)
			{
				base.ReportAutoDisable();
			}
			return isSupported;
		}

		// Token: 0x06003234 RID: 12852 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003234")]
		[Address(RVA = "0x4B1150", Offset = "0x4B0150", VA = "0x1804B1150")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003235 RID: 12853 RVA: 0x0006C4C4 File Offset: 0x0006A6C4
		[Token(Token = "0x6003235")]
		[Address(RVA = "0x4B17F0", Offset = "0x4B07F0", VA = "0x1804B17F0")]
		public VignetteAndChromaticAberration()
		{
		}

		// Token: 0x04003C75 RID: 15477
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003C75")]
		public VignetteAndChromaticAberration.AberrationMode mode;

		// Token: 0x04003C76 RID: 15478
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003C76")]
		public float intensity = 0.036f;

		// Token: 0x04003C77 RID: 15479
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003C77")]
		public float chromaticAberration = 0.2f;

		// Token: 0x04003C78 RID: 15480
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x4003C78")]
		public float axialAberration = 0.5f;

		// Token: 0x04003C79 RID: 15481
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003C79")]
		public float blur;

		// Token: 0x04003C7A RID: 15482
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4003C7A")]
		public float blurSpread = 0.75f;

		// Token: 0x04003C7B RID: 15483
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003C7B")]
		public float luminanceDependency = 0.25f;

		// Token: 0x04003C7C RID: 15484
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x4003C7C")]
		public float blurDistance = 2.5f;

		// Token: 0x04003C7D RID: 15485
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003C7D")]
		public Shader vignetteShader;

		// Token: 0x04003C7E RID: 15486
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003C7E")]
		public Shader separableBlurShader;

		// Token: 0x04003C7F RID: 15487
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003C7F")]
		public Shader chromAberrationShader;

		// Token: 0x04003C80 RID: 15488
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003C80")]
		private Material m_VignetteMaterial;

		// Token: 0x04003C81 RID: 15489
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003C81")]
		private Material m_SeparableBlurMaterial;

		// Token: 0x04003C82 RID: 15490
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003C82")]
		private Material m_ChromAberrationMaterial;

		// Token: 0x0200062C RID: 1580
		[Token(Token = "0x200062C")]
		public enum AberrationMode
		{
			// Token: 0x04003C84 RID: 15492
			[Token(Token = "0x4003C84")]
			Simple,
			// Token: 0x04003C85 RID: 15493
			[Token(Token = "0x4003C85")]
			Advanced
		}
	}
}
