using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x0200061A RID: 1562
	[Token(Token = "0x200061A")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Other/Screen Overlay")]
	public class ScreenOverlay : PostEffectsBase
	{
		// Token: 0x0600320E RID: 12814 RVA: 0x0006BF90 File Offset: 0x0006A190
		[Token(Token = "0x600320E")]
		[Address(RVA = "0x513C60", Offset = "0x512C60", VA = "0x180513C60", 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: 0x0600320F RID: 12815 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600320F")]
		[Address(RVA = "0x513CC0", Offset = "0x512CC0", VA = "0x180513CC0")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003210 RID: 12816 RVA: 0x0006BFDC File Offset: 0x0006A1DC
		[Token(Token = "0x6003210")]
		[Address(RVA = "0x513E70", Offset = "0x512E70", VA = "0x180513E70")]
		public ScreenOverlay()
		{
		}

		// Token: 0x04003C0D RID: 15373
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003C0D")]
		public ScreenOverlay.OverlayBlendMode blendMode = (ScreenOverlay.OverlayBlendMode)((ulong)3L);

		// Token: 0x04003C0E RID: 15374
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003C0E")]
		public float intensity = 1f;

		// Token: 0x04003C0F RID: 15375
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003C0F")]
		public Texture2D texture;

		// Token: 0x04003C10 RID: 15376
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003C10")]
		public Shader overlayShader;

		// Token: 0x04003C11 RID: 15377
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003C11")]
		private Material overlayMaterial;

		// Token: 0x0200061B RID: 1563
		[Token(Token = "0x200061B")]
		public enum OverlayBlendMode
		{
			// Token: 0x04003C13 RID: 15379
			[Token(Token = "0x4003C13")]
			Additive,
			// Token: 0x04003C14 RID: 15380
			[Token(Token = "0x4003C14")]
			ScreenBlend,
			// Token: 0x04003C15 RID: 15381
			[Token(Token = "0x4003C15")]
			Multiply,
			// Token: 0x04003C16 RID: 15382
			[Token(Token = "0x4003C16")]
			Overlay,
			// Token: 0x04003C17 RID: 15383
			[Token(Token = "0x4003C17")]
			AlphaBlend
		}
	}
}
