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

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000633 RID: 1587
	public class ScreenOverlay : PostEffectsBase
	{
		// Token: 0x0600A52B RID: 42283 RVA: 0x002A5D28 File Offset: 0x002A3F28
		[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: 0x0600A52C RID: 42284 RVA: 0x002A5D84 File Offset: 0x002A3F84
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 653874, XrefRangeEnd = 653888, 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: 0x0600A52D RID: 42285 RVA: 0x002A5DF8 File Offset: 0x002A3FF8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 653888, XrefRangeEnd = 653889, 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: 0x0600A52E RID: 42286 RVA: 0x002A5E44 File Offset: 0x002A4044
		// 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, 100676110);
			ScreenOverlay.NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, 100676111);
			ScreenOverlay.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ScreenOverlay>.NativeClassPtr, 100676112);
		}

		// Token: 0x0600A52F RID: 42287 RVA: 0x00298C00 File Offset: 0x00296E00
		public ScreenOverlay(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170037D8 RID: 14296
		// (get) Token: 0x0600A530 RID: 42288 RVA: 0x002A5F14 File Offset: 0x002A4114
		// (set) Token: 0x0600A531 RID: 42289 RVA: 0x002A5F3C File Offset: 0x002A413C
		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: 0x170037D9 RID: 14297
		// (get) Token: 0x0600A532 RID: 42290 RVA: 0x002A5F60 File Offset: 0x002A4160
		// (set) Token: 0x0600A533 RID: 42291 RVA: 0x002A5F88 File Offset: 0x002A4188
		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: 0x170037DA RID: 14298
		// (get) Token: 0x0600A534 RID: 42292 RVA: 0x002A5FAC File Offset: 0x002A41AC
		// (set) Token: 0x0600A535 RID: 42293 RVA: 0x002A5FE0 File Offset: 0x002A41E0
		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: 0x170037DB RID: 14299
		// (get) Token: 0x0600A536 RID: 42294 RVA: 0x002A6008 File Offset: 0x002A4208
		// (set) Token: 0x0600A537 RID: 42295 RVA: 0x002A603C File Offset: 0x002A423C
		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: 0x170037DC RID: 14300
		// (get) Token: 0x0600A538 RID: 42296 RVA: 0x002A6064 File Offset: 0x002A4264
		// (set) Token: 0x0600A539 RID: 42297 RVA: 0x002A6098 File Offset: 0x002A4298
		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: 0x04006EC1 RID: 28353
		private static readonly IntPtr NativeFieldInfoPtr_blendMode;

		// Token: 0x04006EC2 RID: 28354
		private static readonly IntPtr NativeFieldInfoPtr_intensity;

		// Token: 0x04006EC3 RID: 28355
		private static readonly IntPtr NativeFieldInfoPtr_texture;

		// Token: 0x04006EC4 RID: 28356
		private static readonly IntPtr NativeFieldInfoPtr_overlayShader;

		// Token: 0x04006EC5 RID: 28357
		private static readonly IntPtr NativeFieldInfoPtr_overlayMaterial;

		// Token: 0x04006EC6 RID: 28358
		private static readonly IntPtr NativeMethodInfoPtr_CheckResources_Public_Virtual_Boolean_0;

		// Token: 0x04006EC7 RID: 28359
		private static readonly IntPtr NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0;

		// Token: 0x04006EC8 RID: 28360
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x02000634 RID: 1588
		public enum OverlayBlendMode
		{
			// Token: 0x04006ECA RID: 28362
			Additive,
			// Token: 0x04006ECB RID: 28363
			ScreenBlend,
			// Token: 0x04006ECC RID: 28364
			Multiply,
			// Token: 0x04006ECD RID: 28365
			Overlay,
			// Token: 0x04006ECE RID: 28366
			AlphaBlend
		}
	}
}
