using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000602 RID: 1538
	[Token(Token = "0x2000602")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Color Adjustments/Contrast Enhance (Unsharp Mask)")]
	[RequireComponent(typeof(Camera))]
	public class ContrastEnhance : PostEffectsBase
	{
		// Token: 0x060031A4 RID: 12708 RVA: 0x0006B228 File Offset: 0x00069428
		[Token(Token = "0x60031A4")]
		[Address(RVA = "0x12EEE20", Offset = "0x12EDE20", VA = "0x1812EEE20", Slot = "4")]
		public override bool CheckResources()
		{
			int num = 0;
			bool flag = base.CheckSupport(num != 0);
			Material material = this.contrastCompositeMaterial;
			Shader shader = this.contrastCompositeShader;
			Material material2 = base.CheckShaderAndCreateMaterial(shader, material);
			this.contrastCompositeMaterial = material2;
			Material material3 = this.separableBlurMaterial;
			Shader shader2 = this.separableBlurShader;
			Material material4 = base.CheckShaderAndCreateMaterial(shader2, material3);
			this.separableBlurMaterial = material4;
			bool isSupported = this.isSupported;
			if (!isSupported)
			{
				base.ReportAutoDisable();
			}
			return isSupported;
		}

		// Token: 0x060031A5 RID: 12709 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60031A5")]
		[Address(RVA = "0x12EEEA0", Offset = "0x12EDEA0", VA = "0x1812EEEA0")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060031A6 RID: 12710 RVA: 0x0006B298 File Offset: 0x00069498
		[Token(Token = "0x60031A6")]
		[Address(RVA = "0x12EF280", Offset = "0x12EE280", VA = "0x1812EF280")]
		public ContrastEnhance()
		{
		}

		// Token: 0x04003B47 RID: 15175
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003B47")]
		[Range(0f, 1f)]
		public float intensity = 0.5f;

		// Token: 0x04003B48 RID: 15176
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003B48")]
		[Range(0f, 0.999f)]
		public float threshold;

		// Token: 0x04003B49 RID: 15177
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003B49")]
		private Material separableBlurMaterial;

		// Token: 0x04003B4A RID: 15178
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003B4A")]
		private Material contrastCompositeMaterial;

		// Token: 0x04003B4B RID: 15179
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003B4B")]
		[Range(0f, 1f)]
		public float blurSpread = 1f;

		// Token: 0x04003B4C RID: 15180
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003B4C")]
		public Shader separableBlurShader;

		// Token: 0x04003B4D RID: 15181
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003B4D")]
		public Shader contrastCompositeShader;
	}
}
