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

namespace UnityEngine.PostProcessing
{
	// Token: 0x0200058F RID: 1423
	public static class GraphicsUtils : Object
	{
		// Token: 0x1700335E RID: 13150
		// (get) Token: 0x060097B5 RID: 38837 RVA: 0x0026F26C File Offset: 0x0026D46C
		public unsafe static bool isLinearColorSpace
		{
			[CallerCount(2)]
			[CachedScanResults(RefRangeStart = 617335, RefRangeEnd = 617337, XrefRangeStart = 617334, XrefRangeEnd = 617335, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			get
			{
				IntPtr* ptr = null;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_get_isLinearColorSpace_Public_Static_get_Boolean_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x1700335F RID: 13151
		// (get) Token: 0x060097B6 RID: 38838 RVA: 0x0026F2B0 File Offset: 0x0026D4B0
		public unsafe static bool supportsDX11
		{
			[CallerCount(0)]
			[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 617337, XrefRangeEnd = 617338, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			get
			{
				IntPtr* ptr = null;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_get_supportsDX11_Public_Static_get_Boolean_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x17003360 RID: 13152
		// (get) Token: 0x060097B7 RID: 38839 RVA: 0x0026F2F4 File Offset: 0x0026D4F4
		public unsafe static Texture2D whiteTexture
		{
			[CallerCount(1)]
			[CachedScanResults(RefRangeStart = 617356, RefRangeEnd = 617357, XrefRangeStart = 617338, XrefRangeEnd = 617356, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			get
			{
				IntPtr* ptr = null;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_get_whiteTexture_Public_Static_get_Texture2D_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new Texture2D(intPtr3) : null;
			}
		}

		// Token: 0x17003361 RID: 13153
		// (get) Token: 0x060097B8 RID: 38840 RVA: 0x0026F33C File Offset: 0x0026D53C
		public unsafe static Mesh quad
		{
			[CallerCount(2)]
			[CachedScanResults(RefRangeStart = 617389, RefRangeEnd = 617391, XrefRangeStart = 617357, XrefRangeEnd = 617389, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			get
			{
				IntPtr* ptr = null;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_get_quad_Public_Static_get_Mesh_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new Mesh(intPtr3) : null;
			}
		}

		// Token: 0x060097B9 RID: 38841 RVA: 0x0026F384 File Offset: 0x0026D584
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 617406, RefRangeEnd = 617407, XrefRangeStart = 617391, XrefRangeEnd = 617406, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void Blit(Material material, int pass)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(material);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref pass;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_Blit_Public_Static_Void_Material_Int32_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060097BA RID: 38842 RVA: 0x0026F3E4 File Offset: 0x0026D5E4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 617407, XrefRangeEnd = 617430, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void ClearAndBlit(Texture source, RenderTexture destination, Material material, int pass, bool clearColor = true, bool clearDepth = false)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)6) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(source);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(destination);
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(material);
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref pass;
			ptr[checked(unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref clearColor;
			ptr[checked(unchecked((UIntPtr)5) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref clearDepth;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_ClearAndBlit_Public_Static_Void_Texture_RenderTexture_Material_Int32_Boolean_Boolean_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060097BB RID: 38843 RVA: 0x0026F498 File Offset: 0x0026D698
		[CallerCount(10)]
		[CachedScanResults(RefRangeStart = 617437, RefRangeEnd = 617447, XrefRangeStart = 617430, XrefRangeEnd = 617437, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void Destroy(Object obj)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(obj);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_Destroy_Public_Static_Void_Object_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x060097BC RID: 38844 RVA: 0x0026F4E4 File Offset: 0x0026D6E4
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 617450, RefRangeEnd = 617451, XrefRangeStart = 617447, XrefRangeEnd = 617450, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void Dispose()
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GraphicsUtils.NativeMethodInfoPtr_Dispose_Public_Static_Void_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060097BD RID: 38845 RVA: 0x0026F518 File Offset: 0x0026D718
		// Note: this type is marked as 'beforefieldinit'.
		static GraphicsUtils()
		{
			Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "UnityEngine.PostProcessing", "GraphicsUtils");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr);
			GraphicsUtils.NativeFieldInfoPtr_s_WhiteTexture = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, "s_WhiteTexture");
			GraphicsUtils.NativeFieldInfoPtr_s_Quad = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, "s_Quad");
			GraphicsUtils.NativeMethodInfoPtr_get_isLinearColorSpace_Public_Static_get_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675095);
			GraphicsUtils.NativeMethodInfoPtr_get_supportsDX11_Public_Static_get_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675096);
			GraphicsUtils.NativeMethodInfoPtr_get_whiteTexture_Public_Static_get_Texture2D_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675097);
			GraphicsUtils.NativeMethodInfoPtr_get_quad_Public_Static_get_Mesh_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675098);
			GraphicsUtils.NativeMethodInfoPtr_Blit_Public_Static_Void_Material_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675099);
			GraphicsUtils.NativeMethodInfoPtr_ClearAndBlit_Public_Static_Void_Texture_RenderTexture_Material_Int32_Boolean_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675100);
			GraphicsUtils.NativeMethodInfoPtr_Destroy_Public_Static_Void_Object_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675101);
			GraphicsUtils.NativeMethodInfoPtr_Dispose_Public_Static_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675102);
		}

		// Token: 0x060097BE RID: 38846 RVA: 0x0000A688 File Offset: 0x00008888
		public GraphicsUtils(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x1700335C RID: 13148
		// (get) Token: 0x060097BF RID: 38847 RVA: 0x0026F610 File Offset: 0x0026D810
		// (set) Token: 0x060097C0 RID: 38848 RVA: 0x0026F63B File Offset: 0x0026D83B
		public unsafe static Texture2D s_WhiteTexture
		{
			get
			{
				IntPtr intPtr;
				IL2CPP.il2cpp_field_static_get_value(GraphicsUtils.NativeFieldInfoPtr_s_WhiteTexture, (void*)(&intPtr));
				IntPtr intPtr2 = intPtr;
				return (intPtr2 != 0) ? new Texture2D(intPtr2) : null;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(GraphicsUtils.NativeFieldInfoPtr_s_WhiteTexture, IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x1700335D RID: 13149
		// (get) Token: 0x060097C1 RID: 38849 RVA: 0x0026F650 File Offset: 0x0026D850
		// (set) Token: 0x060097C2 RID: 38850 RVA: 0x0026F67B File Offset: 0x0026D87B
		public unsafe static Mesh s_Quad
		{
			get
			{
				IntPtr intPtr;
				IL2CPP.il2cpp_field_static_get_value(GraphicsUtils.NativeFieldInfoPtr_s_Quad, (void*)(&intPtr));
				IntPtr intPtr2 = intPtr;
				return (intPtr2 != 0) ? new Mesh(intPtr2) : null;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(GraphicsUtils.NativeFieldInfoPtr_s_Quad, IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x040065CD RID: 26061
		private static readonly IntPtr NativeFieldInfoPtr_s_WhiteTexture;

		// Token: 0x040065CE RID: 26062
		private static readonly IntPtr NativeFieldInfoPtr_s_Quad;

		// Token: 0x040065CF RID: 26063
		private static readonly IntPtr NativeMethodInfoPtr_get_isLinearColorSpace_Public_Static_get_Boolean_0;

		// Token: 0x040065D0 RID: 26064
		private static readonly IntPtr NativeMethodInfoPtr_get_supportsDX11_Public_Static_get_Boolean_0;

		// Token: 0x040065D1 RID: 26065
		private static readonly IntPtr NativeMethodInfoPtr_get_whiteTexture_Public_Static_get_Texture2D_0;

		// Token: 0x040065D2 RID: 26066
		private static readonly IntPtr NativeMethodInfoPtr_get_quad_Public_Static_get_Mesh_0;

		// Token: 0x040065D3 RID: 26067
		private static readonly IntPtr NativeMethodInfoPtr_Blit_Public_Static_Void_Material_Int32_0;

		// Token: 0x040065D4 RID: 26068
		private static readonly IntPtr NativeMethodInfoPtr_ClearAndBlit_Public_Static_Void_Texture_RenderTexture_Material_Int32_Boolean_Boolean_0;

		// Token: 0x040065D5 RID: 26069
		private static readonly IntPtr NativeMethodInfoPtr_Destroy_Public_Static_Void_Object_0;

		// Token: 0x040065D6 RID: 26070
		private static readonly IntPtr NativeMethodInfoPtr_Dispose_Public_Static_Void_0;
	}
}
