using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005DB RID: 1499
	public class ScreenOverlay : PostEffectsBase
	{
		// Token: 0x06009CD8 RID: 40152 RVA: 0x00282FEC File Offset: 0x002811EC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 0, XrefRangeEnd = 0, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe override bool CheckResources()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IL2CPP.il2cpp_object_get_virtual_method(IL2CPP.Il2CppObjectBaseToPtr(this), ScreenOverlay.NativeMethodInfoPtr_CheckResources_Public_Virtual_Boolean_0), IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x06009CD9 RID: 40153 RVA: 0x00283048 File Offset: 0x00281248
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 621572, XrefRangeEnd = 621586, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(source);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(destination);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ScreenOverlay.NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06009CDA RID: 40154 RVA: 0x002830BC File Offset: 0x002812BC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 621586, XrefRangeEnd = 621587, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe ScreenOverlay()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ScreenOverlay.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06009CDB RID: 40155 RVA: 0x00283108 File Offset: 0x00281308
		// Note: this type is marked as 'beforefieldinit'.
		static ScreenOverlay()
		{
			Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "UnityStandardAssets.ImageEffects", "ScreenOverlay");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr);
			ScreenOverlay.NativeFieldInfoPtr_blendMode = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, "blendMode");
			ScreenOverlay.NativeFieldInfoPtr_intensity = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, "intensity");
			ScreenOverlay.NativeFieldInfoPtr_texture = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, "texture");
			ScreenOverlay.NativeFieldInfoPtr_overlayShader = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, "overlayShader");
			ScreenOverlay.NativeFieldInfoPtr_overlayMaterial = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, "overlayMaterial");
			ScreenOverlay.NativeMethodInfoPtr_CheckResources_Public_Virtual_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, 100675397);
			ScreenOverlay.NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, 100675398);
			ScreenOverlay.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, 100675399);
		}

		// Token: 0x06009CDC RID: 40156 RVA: 0x00275EC4 File Offset: 0x002740C4
		public ScreenOverlay(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x1700353D RID: 13629
		// (get) Token: 0x06009CDD RID: 40157 RVA: 0x002831D8 File Offset: 0x002813D8
		// (set) Token: 0x06009CDE RID: 40158 RVA: 0x00283200 File Offset: 0x00281400
		public unsafe ScreenOverlay.OverlayBlendMode blendMode
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_blendMode);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_blendMode)) = value;
			}
		}

		// Token: 0x1700353E RID: 13630
		// (get) Token: 0x06009CDF RID: 40159 RVA: 0x00283224 File Offset: 0x00281424
		// (set) Token: 0x06009CE0 RID: 40160 RVA: 0x0028324C File Offset: 0x0028144C
		public unsafe float intensity
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_intensity);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_intensity)) = value;
			}
		}

		// Token: 0x1700353F RID: 13631
		// (get) Token: 0x06009CE1 RID: 40161 RVA: 0x00283270 File Offset: 0x00281470
		// (set) Token: 0x06009CE2 RID: 40162 RVA: 0x002832A4 File Offset: 0x002814A4
		public unsafe Texture2D texture
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_texture);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Texture2D(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_texture), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x17003540 RID: 13632
		// (get) Token: 0x06009CE3 RID: 40163 RVA: 0x002832CC File Offset: 0x002814CC
		// (set) Token: 0x06009CE4 RID: 40164 RVA: 0x00283300 File Offset: 0x00281500
		public unsafe Shader overlayShader
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_overlayShader);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Shader(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_overlayShader), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x17003541 RID: 13633
		// (get) Token: 0x06009CE5 RID: 40165 RVA: 0x00283328 File Offset: 0x00281528
		// (set) Token: 0x06009CE6 RID: 40166 RVA: 0x0028335C File Offset: 0x0028155C
		public unsafe Material overlayMaterial
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_overlayMaterial);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Material(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(ScreenOverlay.NativeFieldInfoPtr_overlayMaterial), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04006918 RID: 26904
		private static readonly IntPtr NativeFieldInfoPtr_blendMode;

		// Token: 0x04006919 RID: 26905
		private static readonly IntPtr NativeFieldInfoPtr_intensity;

		// Token: 0x0400691A RID: 26906
		private static readonly IntPtr NativeFieldInfoPtr_texture;

		// Token: 0x0400691B RID: 26907
		private static readonly IntPtr NativeFieldInfoPtr_overlayShader;

		// Token: 0x0400691C RID: 26908
		private static readonly IntPtr NativeFieldInfoPtr_overlayMaterial;

		// Token: 0x0400691D RID: 26909
		private static readonly IntPtr NativeMethodInfoPtr_CheckResources_Public_Virtual_Boolean_0;

		// Token: 0x0400691E RID: 26910
		private static readonly IntPtr NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0;

		// Token: 0x0400691F RID: 26911
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x020005DC RID: 1500
		public enum OverlayBlendMode
		{
			// Token: 0x04006921 RID: 26913
			Additive,
			// Token: 0x04006922 RID: 26914
			ScreenBlend,
			// Token: 0x04006923 RID: 26915
			Multiply,
			// Token: 0x04006924 RID: 26916
			Overlay,
			// Token: 0x04006925 RID: 26917
			AlphaBlend
		}
	}
}
