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

namespace UnityEngine.PostProcessing
{
	// Token: 0x02000590 RID: 1424
	public sealed class MaterialFactory : Object
	{
		// Token: 0x060097C3 RID: 38851 RVA: 0x0026F690 File Offset: 0x0026D890
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 617459, RefRangeEnd = 617460, XrefRangeStart = 617451, XrefRangeEnd = 617459, 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: 0x060097C4 RID: 38852 RVA: 0x0026F6DC File Offset: 0x0026D8DC
		[CallerCount(22)]
		[CachedScanResults(RefRangeStart = 617484, RefRangeEnd = 617506, XrefRangeStart = 617460, XrefRangeEnd = 617484, 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: 0x060097C5 RID: 38853 RVA: 0x0026F74C File Offset: 0x0026D94C
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 617520, RefRangeEnd = 617521, XrefRangeStart = 617506, XrefRangeEnd = 617520, 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: 0x060097C6 RID: 38854 RVA: 0x0026F790 File Offset: 0x0026D990
		// 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, 100675103);
			MaterialFactory.NativeMethodInfoPtr_Get_Public_Material_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr, 100675104);
			MaterialFactory.NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MaterialFactory>.NativeClassPtr, 100675105);
		}

		// Token: 0x060097C7 RID: 38855 RVA: 0x0000A688 File Offset: 0x00008888
		public MaterialFactory(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17003362 RID: 13154
		// (get) Token: 0x060097C8 RID: 38856 RVA: 0x0026F810 File Offset: 0x0026DA10
		// (set) Token: 0x060097C9 RID: 38857 RVA: 0x0026F844 File Offset: 0x0026DA44
		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: 0x040065D7 RID: 26071
		private static readonly IntPtr NativeFieldInfoPtr_m_Materials;

		// Token: 0x040065D8 RID: 26072
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x040065D9 RID: 26073
		private static readonly IntPtr NativeMethodInfoPtr_Get_Public_Material_String_0;

		// Token: 0x040065DA RID: 26074
		private static readonly IntPtr NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0;
	}
}
