using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000604 RID: 1540
	[Token(Token = "0x2000604")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Edge Detection/Crease Shading")]
	public class CreaseShading : PostEffectsBase
	{
		// Token: 0x060031B1 RID: 12721 RVA: 0x0006B368 File Offset: 0x00069568
		[Token(Token = "0x60031B1")]
		[Address(RVA = "0x12F02F0", Offset = "0x12EF2F0", VA = "0x1812F02F0", 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: 0x060031B2 RID: 12722 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60031B2")]
		[Address(RVA = "0x12F03A0", Offset = "0x12EF3A0", VA = "0x1812F03A0")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060031B3 RID: 12723 RVA: 0x0006B3F8 File Offset: 0x000695F8
		[Token(Token = "0x60031B3")]
		[Address(RVA = "0x12F07E0", Offset = "0x12EF7E0", VA = "0x1812F07E0")]
		public CreaseShading()
		{
		}

		// Token: 0x04003B5B RID: 15195
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003B5B")]
		public float intensity = 0.5f;

		// Token: 0x04003B5C RID: 15196
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003B5C")]
		public int softness = (int)((ulong)1L);

		// Token: 0x04003B5D RID: 15197
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003B5D")]
		public float spread = 1f;

		// Token: 0x04003B5E RID: 15198
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003B5E")]
		public Shader blurShader;

		// Token: 0x04003B5F RID: 15199
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003B5F")]
		private Material blurMaterial;

		// Token: 0x04003B60 RID: 15200
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003B60")]
		public Shader depthFetchShader;

		// Token: 0x04003B61 RID: 15201
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003B61")]
		private Material depthFetchMaterial;

		// Token: 0x04003B62 RID: 15202
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003B62")]
		public Shader creaseApplyShader;

		// Token: 0x04003B63 RID: 15203
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003B63")]
		private Material creaseApplyMaterial;
	}
}
