using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005C2 RID: 1474
	[Token(Token = "0x20005C2")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Other/Screen Overlay")]
	public class ScreenOverlay : PostEffectsBase
	{
		// Token: 0x06002F45 RID: 12101 RVA: 0x00064CC0 File Offset: 0x00062EC0
		[Token(Token = "0x6002F45")]
		[Address(RVA = "0x439770", Offset = "0x438570", VA = "0x180439770", Slot = "4")]
		public override bool CheckResources()
		{
			int num = 0;
			bool flag = base.CheckSupport(num != 0);
			Material material = this.overlayMaterial;
			Shader shader = this.overlayShader;
			Material material2 = base.CheckShaderAndCreateMaterial(shader, material);
			this.overlayMaterial = material2;
			bool isSupported = this.isSupported;
			if (!isSupported)
			{
				base.ReportAutoDisable();
			}
			return isSupported;
		}

		// Token: 0x06002F46 RID: 12102 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F46")]
		[Address(RVA = "0x4397D0", Offset = "0x4385D0", VA = "0x1804397D0")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F47 RID: 12103 RVA: 0x00064D0C File Offset: 0x00062F0C
		[Token(Token = "0x6002F47")]
		[Address(RVA = "0x439980", Offset = "0x438780", VA = "0x180439980")]
		public ScreenOverlay()
		{
		}

		// Token: 0x04003923 RID: 14627
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003923")]
		public ScreenOverlay.OverlayBlendMode blendMode = (ScreenOverlay.OverlayBlendMode)((ulong)3L);

		// Token: 0x04003924 RID: 14628
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003924")]
		public float intensity = 1f;

		// Token: 0x04003925 RID: 14629
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003925")]
		public Texture2D texture;

		// Token: 0x04003926 RID: 14630
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003926")]
		public Shader overlayShader;

		// Token: 0x04003927 RID: 14631
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003927")]
		private Material overlayMaterial;

		// Token: 0x020005C3 RID: 1475
		[Token(Token = "0x20005C3")]
		public enum OverlayBlendMode
		{
			// Token: 0x04003929 RID: 14633
			[Token(Token = "0x4003929")]
			Additive,
			// Token: 0x0400392A RID: 14634
			[Token(Token = "0x400392A")]
			ScreenBlend,
			// Token: 0x0400392B RID: 14635
			[Token(Token = "0x400392B")]
			Multiply,
			// Token: 0x0400392C RID: 14636
			[Token(Token = "0x400392C")]
			Overlay,
			// Token: 0x0400392D RID: 14637
			[Token(Token = "0x400392D")]
			AlphaBlend
		}
	}
}
