using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005CB RID: 1483
	[Token(Token = "0x20005CB")]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Camera/Tilt Shift (Lens Blur)")]
	internal class TiltShift : PostEffectsBase
	{
		// Token: 0x06002F59 RID: 12121 RVA: 0x00064FA4 File Offset: 0x000631A4
		[Token(Token = "0x6002F59")]
		[Address(RVA = "0xDE2760", Offset = "0xDE1560", VA = "0x180DE2760", 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: 0x06002F5A RID: 12122 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F5A")]
		[Address(RVA = "0x1300C90", Offset = "0x12FFA90", VA = "0x181300C90")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F5B RID: 12123 RVA: 0x00064FF0 File Offset: 0x000631F0
		[Token(Token = "0x6002F5B")]
		[Address(RVA = "0x1300F70", Offset = "0x12FFD70", VA = "0x181300F70")]
		public TiltShift()
		{
		}

		// Token: 0x0400395A RID: 14682
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400395A")]
		public TiltShift.TiltShiftMode mode;

		// Token: 0x0400395B RID: 14683
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x400395B")]
		public TiltShift.TiltShiftQuality quality = (TiltShift.TiltShiftQuality)((ulong)2L);

		// Token: 0x0400395C RID: 14684
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400395C")]
		[Range(0f, 15f)]
		public float blurArea = 1f;

		// Token: 0x0400395D RID: 14685
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x400395D")]
		[Range(0f, 25f)]
		public float maxBlurSize = 5f;

		// Token: 0x0400395E RID: 14686
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x400395E")]
		[Range(0f, 1f)]
		public int downsample;

		// Token: 0x0400395F RID: 14687
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x400395F")]
		public Shader tiltShiftShader;

		// Token: 0x04003960 RID: 14688
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003960")]
		private Material tiltShiftMaterial;

		// Token: 0x020005CC RID: 1484
		[Token(Token = "0x20005CC")]
		public enum TiltShiftMode
		{
			// Token: 0x04003962 RID: 14690
			[Token(Token = "0x4003962")]
			TiltShiftMode,
			// Token: 0x04003963 RID: 14691
			[Token(Token = "0x4003963")]
			IrisMode
		}

		// Token: 0x020005CD RID: 1485
		[Token(Token = "0x20005CD")]
		public enum TiltShiftQuality
		{
			// Token: 0x04003965 RID: 14693
			[Token(Token = "0x4003965")]
			Preview,
			// Token: 0x04003966 RID: 14694
			[Token(Token = "0x4003966")]
			Low,
			// Token: 0x04003967 RID: 14695
			[Token(Token = "0x4003967")]
			Normal,
			// Token: 0x04003968 RID: 14696
			[Token(Token = "0x4003968")]
			High
		}
	}
}
