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

namespace UnityEngine.PostProcessing
{
	// Token: 0x02000591 RID: 1425
	public sealed class RenderTextureFactory : Object
	{
		// Token: 0x060097CA RID: 38858 RVA: 0x0026F86C File Offset: 0x0026DA6C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 617521, XrefRangeEnd = 617529, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe RenderTextureFactory()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(RenderTextureFactory.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060097CB RID: 38859 RVA: 0x0026F8B8 File Offset: 0x0026DAB8
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 617543, RefRangeEnd = 617545, XrefRangeStart = 617529, XrefRangeEnd = 617543, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe RenderTexture Get(RenderTexture baseRenderTexture)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(baseRenderTexture);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(RenderTextureFactory.NativeMethodInfoPtr_Get_Public_RenderTexture_RenderTexture_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new RenderTexture(intPtr3) : null;
			}
		}

		// Token: 0x060097CC RID: 38860 RVA: 0x0026F928 File Offset: 0x0026DB28
		[CallerCount(7)]
		[CachedScanResults(RefRangeStart = 617552, RefRangeEnd = 617559, XrefRangeStart = 617545, XrefRangeEnd = 617552, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe RenderTexture Get(int width, int height, int depthBuffer = 0, RenderTextureFormat format = RenderTextureFormat.ARGBHalf, RenderTextureReadWrite rw = RenderTextureReadWrite.Default, FilterMode filterMode = FilterMode.Bilinear, TextureWrapMode wrapMode = TextureWrapMode.Clamp, string name = "FactoryTempTexture")
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)8) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref width;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref height;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref depthBuffer;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref format;
			ptr[checked(unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref rw;
			ptr[checked(unchecked((UIntPtr)5) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref filterMode;
			ptr[checked(unchecked((UIntPtr)6) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref wrapMode;
			ptr[checked(unchecked((UIntPtr)7) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(name);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(RenderTextureFactory.NativeMethodInfoPtr_Get_Public_RenderTexture_Int32_Int32_Int32_RenderTextureFormat_RenderTextureReadWrite_FilterMode_TextureWrapMode_String_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new RenderTexture(intPtr3) : null;
		}

		// Token: 0x060097CD RID: 38861 RVA: 0x0026FA1C File Offset: 0x0026DC1C
		[CallerCount(6)]
		[CachedScanResults(RefRangeStart = 617570, RefRangeEnd = 617576, XrefRangeStart = 617559, XrefRangeEnd = 617570, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Release(RenderTexture rt)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(rt);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(RenderTextureFactory.NativeMethodInfoPtr_Release_Public_Void_RenderTexture_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x060097CE RID: 38862 RVA: 0x0026FA78 File Offset: 0x0026DC78
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 617589, RefRangeEnd = 617592, XrefRangeStart = 617576, XrefRangeEnd = 617589, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void ReleaseAll()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(RenderTextureFactory.NativeMethodInfoPtr_ReleaseAll_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060097CF RID: 38863 RVA: 0x0026FABC File Offset: 0x0026DCBC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 617592, XrefRangeEnd = 617593, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Dispose()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(RenderTextureFactory.NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060097D0 RID: 38864 RVA: 0x0026FB00 File Offset: 0x0026DD00
		// Note: this type is marked as 'beforefieldinit'.
		static RenderTextureFactory()
		{
			Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "UnityEngine.PostProcessing", "RenderTextureFactory");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr);
			RenderTextureFactory.NativeFieldInfoPtr_m_TemporaryRTs = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, "m_TemporaryRTs");
			RenderTextureFactory.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675106);
			RenderTextureFactory.NativeMethodInfoPtr_Get_Public_RenderTexture_RenderTexture_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675107);
			RenderTextureFactory.NativeMethodInfoPtr_Get_Public_RenderTexture_Int32_Int32_Int32_RenderTextureFormat_RenderTextureReadWrite_FilterMode_TextureWrapMode_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675108);
			RenderTextureFactory.NativeMethodInfoPtr_Release_Public_Void_RenderTexture_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675109);
			RenderTextureFactory.NativeMethodInfoPtr_ReleaseAll_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675110);
			RenderTextureFactory.NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675111);
		}

		// Token: 0x060097D1 RID: 38865 RVA: 0x0000A688 File Offset: 0x00008888
		public RenderTextureFactory(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17003363 RID: 13155
		// (get) Token: 0x060097D2 RID: 38866 RVA: 0x0026FBBC File Offset: 0x0026DDBC
		// (set) Token: 0x060097D3 RID: 38867 RVA: 0x0026FBF0 File Offset: 0x0026DDF0
		public unsafe HashSet<RenderTexture> m_TemporaryRTs
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(RenderTextureFactory.NativeFieldInfoPtr_m_TemporaryRTs);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new HashSet<RenderTexture>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(RenderTextureFactory.NativeFieldInfoPtr_m_TemporaryRTs), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x040065DB RID: 26075
		private static readonly IntPtr NativeFieldInfoPtr_m_TemporaryRTs;

		// Token: 0x040065DC RID: 26076
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x040065DD RID: 26077
		private static readonly IntPtr NativeMethodInfoPtr_Get_Public_RenderTexture_RenderTexture_0;

		// Token: 0x040065DE RID: 26078
		private static readonly IntPtr NativeMethodInfoPtr_Get_Public_RenderTexture_Int32_Int32_Int32_RenderTextureFormat_RenderTextureReadWrite_FilterMode_TextureWrapMode_String_0;

		// Token: 0x040065DF RID: 26079
		private static readonly IntPtr NativeMethodInfoPtr_Release_Public_Void_RenderTexture_0;

		// Token: 0x040065E0 RID: 26080
		private static readonly IntPtr NativeMethodInfoPtr_ReleaseAll_Public_Void_0;

		// Token: 0x040065E1 RID: 26081
		private static readonly IntPtr NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0;
	}
}
