using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005AC RID: 1452
	[Token(Token = "0x20005AC")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Edge Detection/Crease Shading")]
	[RequireComponent(typeof(Camera))]
	public class CreaseShading : PostEffectsBase
	{
		// Token: 0x06002EE8 RID: 12008 RVA: 0x000640AC File Offset: 0x000622AC
		[Token(Token = "0x6002EE8")]
		[Address(RVA = "0xE92370", Offset = "0xE91170", VA = "0x180E92370", Slot = "4")]
		public override bool CheckResources()
		{
			bool flag = base.CheckSupport(true);
			Material material = this.blurMaterial;
			Shader shader = this.blurShader;
			Material material2 = base.CheckShaderAndCreateMaterial(shader, material);
			this.blurMaterial = material2;
			Material material3 = this.depthFetchMaterial;
			Shader shader2 = this.depthFetchShader;
			Material material4 = base.CheckShaderAndCreateMaterial(shader2, material3);
			this.depthFetchMaterial = material4;
			Material material5 = this.creaseApplyMaterial;
			Shader shader3 = this.creaseApplyShader;
			Material material6 = base.CheckShaderAndCreateMaterial(shader3, material5);
			this.creaseApplyMaterial = material6;
			bool isSupported = this.isSupported;
			if (!isSupported)
			{
				base.ReportAutoDisable();
			}
			return isSupported;
		}

		// Token: 0x06002EE9 RID: 12009 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EE9")]
		[Address(RVA = "0xE92420", Offset = "0xE91220", VA = "0x180E92420")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EEA RID: 12010 RVA: 0x0006413C File Offset: 0x0006233C
		[Token(Token = "0x6002EEA")]
		[Address(RVA = "0xE92860", Offset = "0xE91660", VA = "0x180E92860")]
		public CreaseShading()
		{
		}

		// Token: 0x04003871 RID: 14449
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003871")]
		public float intensity = 0.5f;

		// Token: 0x04003872 RID: 14450
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003872")]
		public int softness = (int)((ulong)1L);

		// Token: 0x04003873 RID: 14451
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003873")]
		public float spread = 1f;

		// Token: 0x04003874 RID: 14452
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003874")]
		public Shader blurShader;

		// Token: 0x04003875 RID: 14453
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003875")]
		private Material blurMaterial;

		// Token: 0x04003876 RID: 14454
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003876")]
		public Shader depthFetchShader;

		// Token: 0x04003877 RID: 14455
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003877")]
		private Material depthFetchMaterial;

		// Token: 0x04003878 RID: 14456
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003878")]
		public Shader creaseApplyShader;

		// Token: 0x04003879 RID: 14457
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003879")]
		private Material creaseApplyMaterial;
	}
}
