using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005D3 RID: 1491
	[Token(Token = "0x20005D3")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Camera/Vignette and Chromatic Aberration")]
	[RequireComponent(typeof(Camera))]
	public class VignetteAndChromaticAberration : PostEffectsBase
	{
		// Token: 0x06002F6A RID: 12138 RVA: 0x00065160 File Offset: 0x00063360
		[Token(Token = "0x6002F6A")]
		[Address(RVA = "0x9370B0", Offset = "0x935EB0", VA = "0x1809370B0", 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: 0x06002F6B RID: 12139 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F6B")]
		[Address(RVA = "0x937160", Offset = "0x935F60", VA = "0x180937160")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F6C RID: 12140 RVA: 0x000651F4 File Offset: 0x000633F4
		[Token(Token = "0x6002F6C")]
		[Address(RVA = "0x937800", Offset = "0x936600", VA = "0x180937800")]
		public VignetteAndChromaticAberration()
		{
		}

		// Token: 0x0400398B RID: 14731
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400398B")]
		public VignetteAndChromaticAberration.AberrationMode mode;

		// Token: 0x0400398C RID: 14732
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x400398C")]
		public float intensity = 0.036f;

		// Token: 0x0400398D RID: 14733
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400398D")]
		public float chromaticAberration = 0.2f;

		// Token: 0x0400398E RID: 14734
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x400398E")]
		public float axialAberration = 0.5f;

		// Token: 0x0400398F RID: 14735
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x400398F")]
		public float blur;

		// Token: 0x04003990 RID: 14736
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4003990")]
		public float blurSpread = 0.75f;

		// Token: 0x04003991 RID: 14737
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003991")]
		public float luminanceDependency = 0.25f;

		// Token: 0x04003992 RID: 14738
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x4003992")]
		public float blurDistance = 2.5f;

		// Token: 0x04003993 RID: 14739
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003993")]
		public Shader vignetteShader;

		// Token: 0x04003994 RID: 14740
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003994")]
		public Shader separableBlurShader;

		// Token: 0x04003995 RID: 14741
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003995")]
		public Shader chromAberrationShader;

		// Token: 0x04003996 RID: 14742
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003996")]
		private Material m_VignetteMaterial;

		// Token: 0x04003997 RID: 14743
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003997")]
		private Material m_SeparableBlurMaterial;

		// Token: 0x04003998 RID: 14744
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003998")]
		private Material m_ChromAberrationMaterial;

		// Token: 0x020005D4 RID: 1492
		[Token(Token = "0x20005D4")]
		public enum AberrationMode
		{
			// Token: 0x0400399A RID: 14746
			[Token(Token = "0x400399A")]
			Simple,
			// Token: 0x0400399B RID: 14747
			[Token(Token = "0x400399B")]
			Advanced
		}
	}
}
