using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005AA RID: 1450
	[Token(Token = "0x20005AA")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Color Adjustments/Contrast Enhance (Unsharp Mask)")]
	[RequireComponent(typeof(Camera))]
	public class ContrastEnhance : PostEffectsBase
	{
		// Token: 0x06002EDB RID: 11995 RVA: 0x00063F6C File Offset: 0x0006216C
		[Token(Token = "0x6002EDB")]
		[Address(RVA = "0xE90EA0", Offset = "0xE8FCA0", VA = "0x180E90EA0", 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: 0x06002EDC RID: 11996 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EDC")]
		[Address(RVA = "0xE90F20", Offset = "0xE8FD20", VA = "0x180E90F20")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EDD RID: 11997 RVA: 0x00063FDC File Offset: 0x000621DC
		[Token(Token = "0x6002EDD")]
		[Address(RVA = "0xE91300", Offset = "0xE90100", VA = "0x180E91300")]
		public ContrastEnhance()
		{
		}

		// Token: 0x0400385D RID: 14429
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400385D")]
		[Range(0f, 1f)]
		public float intensity = 0.5f;

		// Token: 0x0400385E RID: 14430
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x400385E")]
		[Range(0f, 0.999f)]
		public float threshold;

		// Token: 0x0400385F RID: 14431
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400385F")]
		private Material separableBlurMaterial;

		// Token: 0x04003860 RID: 14432
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003860")]
		private Material contrastCompositeMaterial;

		// Token: 0x04003861 RID: 14433
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003861")]
		[Range(0f, 1f)]
		public float blurSpread = 1f;

		// Token: 0x04003862 RID: 14434
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003862")]
		public Shader separableBlurShader;

		// Token: 0x04003863 RID: 14435
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003863")]
		public Shader contrastCompositeShader;
	}
}
