using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000623 RID: 1571
	[Token(Token = "0x2000623")]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Camera/Tilt Shift (Lens Blur)")]
	internal class TiltShift : PostEffectsBase
	{
		// Token: 0x06003222 RID: 12834 RVA: 0x0006C274 File Offset: 0x0006A474
		[Token(Token = "0x6003222")]
		[Address(RVA = "0x7B0330", Offset = "0x7AF330", VA = "0x1807B0330", Slot = "4")]
		public override bool CheckResources()
		{
			int num = 0;
			bool flag = base.CheckSupport(num != 0);
			Material material = this.tiltShiftMaterial;
			Shader shader = this.tiltShiftShader;
			Material material2 = base.CheckShaderAndCreateMaterial(shader, material);
			this.tiltShiftMaterial = material2;
			bool isSupported = this.isSupported;
			if (!isSupported)
			{
				base.ReportAutoDisable();
			}
			return isSupported;
		}

		// Token: 0x06003223 RID: 12835 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003223")]
		[Address(RVA = "0xF5E300", Offset = "0xF5D300", VA = "0x180F5E300")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003224 RID: 12836 RVA: 0x0006C2C0 File Offset: 0x0006A4C0
		[Token(Token = "0x6003224")]
		[Address(RVA = "0xF5E5E0", Offset = "0xF5D5E0", VA = "0x180F5E5E0")]
		public TiltShift()
		{
		}

		// Token: 0x04003C44 RID: 15428
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003C44")]
		public TiltShift.TiltShiftMode mode;

		// Token: 0x04003C45 RID: 15429
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003C45")]
		public TiltShift.TiltShiftQuality quality = (TiltShift.TiltShiftQuality)((ulong)2L);

		// Token: 0x04003C46 RID: 15430
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003C46")]
		[Range(0f, 15f)]
		public float blurArea = 1f;

		// Token: 0x04003C47 RID: 15431
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x4003C47")]
		[Range(0f, 25f)]
		public float maxBlurSize = 5f;

		// Token: 0x04003C48 RID: 15432
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003C48")]
		[Range(0f, 1f)]
		public int downsample;

		// Token: 0x04003C49 RID: 15433
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003C49")]
		public Shader tiltShiftShader;

		// Token: 0x04003C4A RID: 15434
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003C4A")]
		private Material tiltShiftMaterial;

		// Token: 0x02000624 RID: 1572
		[Token(Token = "0x2000624")]
		public enum TiltShiftMode
		{
			// Token: 0x04003C4C RID: 15436
			[Token(Token = "0x4003C4C")]
			TiltShiftMode,
			// Token: 0x04003C4D RID: 15437
			[Token(Token = "0x4003C4D")]
			IrisMode
		}

		// Token: 0x02000625 RID: 1573
		[Token(Token = "0x2000625")]
		public enum TiltShiftQuality
		{
			// Token: 0x04003C4F RID: 15439
			[Token(Token = "0x4003C4F")]
			Preview,
			// Token: 0x04003C50 RID: 15440
			[Token(Token = "0x4003C50")]
			Low,
			// Token: 0x04003C51 RID: 15441
			[Token(Token = "0x4003C51")]
			Normal,
			// Token: 0x04003C52 RID: 15442
			[Token(Token = "0x4003C52")]
			High
		}
	}
}
