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

namespace UnityEngine.PostProcessing
{
	// Token: 0x020005E8 RID: 1512
	public sealed class MaterialFactory : Object
	{
		// Token: 0x0600A016 RID: 40982 RVA: 0x002923CC File Offset: 0x002905CC
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 649741, RefRangeEnd = 649742, XrefRangeStart = 649733, XrefRangeEnd = 649741, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe MaterialFactory()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MaterialFactory.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A017 RID: 40983 RVA: 0x00292418 File Offset: 0x00290618
		[CallerCount(22)]
		[CachedScanResults(RefRangeStart = 649766, RefRangeEnd = 649788, XrefRangeStart = 649742, XrefRangeEnd = 649766, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Material Get(string shaderName)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.ManagedStringToIl2Cpp(shaderName);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MaterialFactory.NativeMethodInfoPtr_Get_Public_Material_String_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new Material(intPtr3) : null;
			}
		}

		// Token: 0x0600A018 RID: 40984 RVA: 0x00292488 File Offset: 0x00290688
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 649802, RefRangeEnd = 649803, XrefRangeStart = 649788, XrefRangeEnd = 649802, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Dispose()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MaterialFactory.NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A019 RID: 40985 RVA: 0x002924CC File Offset: 0x002906CC
		// Note: this type is marked as 'beforefieldinit'.
		static MaterialFactory()
		{
			Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "UnityEngine.PostProcessing", "MaterialFactory");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr);
			MaterialFactory.NativeFieldInfoPtr_m_Materials = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr, "m_Materials");
			MaterialFactory.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr, 100675816);
			MaterialFactory.NativeMethodInfoPtr_Get_Public_Material_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr, 100675817);
			MaterialFactory.NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr, 100675818);
		}

		// Token: 0x0600A01A RID: 40986 RVA: 0x0000A74C File Offset: 0x0000894C
		public MaterialFactory(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170035FD RID: 13821
		// (get) Token: 0x0600A01B RID: 40987 RVA: 0x0029254C File Offset: 0x0029074C
		// (set) Token: 0x0600A01C RID: 40988 RVA: 0x00292580 File Offset: 0x00290780
		public unsafe Dictionary<string, Material> m_Materials
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(MaterialFactory.NativeFieldInfoPtr_m_Materials);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Dictionary<string, Material>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(MaterialFactory.NativeFieldInfoPtr_m_Materials), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04006B80 RID: 27520
		private static readonly IntPtr NativeFieldInfoPtr_m_Materials;

		// Token: 0x04006B81 RID: 27521
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x04006B82 RID: 27522
		private static readonly IntPtr NativeMethodInfoPtr_Get_Public_Material_String_0;

		// Token: 0x04006B83 RID: 27523
		private static readonly IntPtr NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0;
	}
}
