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

namespace UnityEngine.PostProcessing
{
	// Token: 0x020005E7 RID: 1511
	public static class GraphicsUtils : Object
	{
		// Token: 0x170035F9 RID: 13817
		// (get) Token: 0x0600A008 RID: 40968 RVA: 0x00291FA8 File Offset: 0x002901A8
		public unsafe static bool isLinearColorSpace
		{
			[CallerCount(2)]
			[CachedScanResults(RefRangeStart = 649617, RefRangeEnd = 649619, XrefRangeStart = 649616, XrefRangeEnd = 649617, 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: 0x170035FA RID: 13818
		// (get) Token: 0x0600A009 RID: 40969 RVA: 0x00291FEC File Offset: 0x002901EC
		public unsafe static bool supportsDX11
		{
			[CallerCount(0)]
			[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 649619, XrefRangeEnd = 649620, 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: 0x170035FB RID: 13819
		// (get) Token: 0x0600A00A RID: 40970 RVA: 0x00292030 File Offset: 0x00290230
		public unsafe static Texture2D whiteTexture
		{
			[CallerCount(1)]
			[CachedScanResults(RefRangeStart = 649638, RefRangeEnd = 649639, XrefRangeStart = 649620, XrefRangeEnd = 649638, 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: 0x170035FC RID: 13820
		// (get) Token: 0x0600A00B RID: 40971 RVA: 0x00292078 File Offset: 0x00290278
		public unsafe static Mesh quad
		{
			[CallerCount(2)]
			[CachedScanResults(RefRangeStart = 649671, RefRangeEnd = 649673, XrefRangeStart = 649639, XrefRangeEnd = 649671, 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: 0x0600A00C RID: 40972 RVA: 0x002920C0 File Offset: 0x002902C0
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 649688, RefRangeEnd = 649689, XrefRangeStart = 649673, XrefRangeEnd = 649688, 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: 0x0600A00D RID: 40973 RVA: 0x00292120 File Offset: 0x00290320
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 649689, XrefRangeEnd = 649712, 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: 0x0600A00E RID: 40974 RVA: 0x002921D4 File Offset: 0x002903D4
		[CallerCount(10)]
		[CachedScanResults(RefRangeStart = 649719, RefRangeEnd = 649729, XrefRangeStart = 649712, XrefRangeEnd = 649719, 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: 0x0600A00F RID: 40975 RVA: 0x00292220 File Offset: 0x00290420
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 649732, RefRangeEnd = 649733, XrefRangeStart = 649729, XrefRangeEnd = 649732, 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: 0x0600A010 RID: 40976 RVA: 0x00292254 File Offset: 0x00290454
		// 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, 100675808);
			GraphicsUtils.NativeMethodInfoPtr_get_supportsDX11_Public_Static_get_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675809);
			GraphicsUtils.NativeMethodInfoPtr_get_whiteTexture_Public_Static_get_Texture2D_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675810);
			GraphicsUtils.NativeMethodInfoPtr_get_quad_Public_Static_get_Mesh_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675811);
			GraphicsUtils.NativeMethodInfoPtr_Blit_Public_Static_Void_Material_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675812);
			GraphicsUtils.NativeMethodInfoPtr_ClearAndBlit_Public_Static_Void_Texture_RenderTexture_Material_Int32_Boolean_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675813);
			GraphicsUtils.NativeMethodInfoPtr_Destroy_Public_Static_Void_Object_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675814);
			GraphicsUtils.NativeMethodInfoPtr_Dispose_Public_Static_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GraphicsUtils>.NativeClassPtr, 100675815);
		}

		// Token: 0x0600A011 RID: 40977 RVA: 0x0000A74C File Offset: 0x0000894C
		public GraphicsUtils(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170035F7 RID: 13815
		// (get) Token: 0x0600A012 RID: 40978 RVA: 0x0029234C File Offset: 0x0029054C
		// (set) Token: 0x0600A013 RID: 40979 RVA: 0x00292377 File Offset: 0x00290577
		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: 0x170035F8 RID: 13816
		// (get) Token: 0x0600A014 RID: 40980 RVA: 0x0029238C File Offset: 0x0029058C
		// (set) Token: 0x0600A015 RID: 40981 RVA: 0x002923B7 File Offset: 0x002905B7
		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: 0x04006B76 RID: 27510
		private static readonly IntPtr NativeFieldInfoPtr_s_WhiteTexture;

		// Token: 0x04006B77 RID: 27511
		private static readonly IntPtr NativeFieldInfoPtr_s_Quad;

		// Token: 0x04006B78 RID: 27512
		private static readonly IntPtr NativeMethodInfoPtr_get_isLinearColorSpace_Public_Static_get_Boolean_0;

		// Token: 0x04006B79 RID: 27513
		private static readonly IntPtr NativeMethodInfoPtr_get_supportsDX11_Public_Static_get_Boolean_0;

		// Token: 0x04006B7A RID: 27514
		private static readonly IntPtr NativeMethodInfoPtr_get_whiteTexture_Public_Static_get_Texture2D_0;

		// Token: 0x04006B7B RID: 27515
		private static readonly IntPtr NativeMethodInfoPtr_get_quad_Public_Static_get_Mesh_0;

		// Token: 0x04006B7C RID: 27516
		private static readonly IntPtr NativeMethodInfoPtr_Blit_Public_Static_Void_Material_Int32_0;

		// Token: 0x04006B7D RID: 27517
		private static readonly IntPtr NativeMethodInfoPtr_ClearAndBlit_Public_Static_Void_Texture_RenderTexture_Material_Int32_Boolean_Boolean_0;

		// Token: 0x04006B7E RID: 27518
		private static readonly IntPtr NativeMethodInfoPtr_Destroy_Public_Static_Void_Object_0;

		// Token: 0x04006B7F RID: 27519
		private static readonly IntPtr NativeMethodInfoPtr_Dispose_Public_Static_Void_0;
	}
}
