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

namespace UnityEngine.PostProcessing
{
	// Token: 0x020005E9 RID: 1513
	public sealed class RenderTextureFactory : Object
	{
		// Token: 0x0600A01D RID: 40989 RVA: 0x002925A8 File Offset: 0x002907A8
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 649811, RefRangeEnd = 649812, XrefRangeStart = 649803, XrefRangeEnd = 649811, 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: 0x0600A01E RID: 40990 RVA: 0x002925F4 File Offset: 0x002907F4
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 649826, RefRangeEnd = 649828, XrefRangeStart = 649812, XrefRangeEnd = 649826, 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: 0x0600A01F RID: 40991 RVA: 0x00292664 File Offset: 0x00290864
		[CallerCount(7)]
		[CachedScanResults(RefRangeStart = 649835, RefRangeEnd = 649842, XrefRangeStart = 649828, XrefRangeEnd = 649835, 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: 0x0600A020 RID: 40992 RVA: 0x00292758 File Offset: 0x00290958
		[CallerCount(6)]
		[CachedScanResults(RefRangeStart = 649853, RefRangeEnd = 649859, XrefRangeStart = 649842, XrefRangeEnd = 649853, 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: 0x0600A021 RID: 40993 RVA: 0x002927B4 File Offset: 0x002909B4
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 649872, RefRangeEnd = 649874, XrefRangeStart = 649859, XrefRangeEnd = 649872, 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: 0x0600A022 RID: 40994 RVA: 0x002927F8 File Offset: 0x002909F8
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 649872, RefRangeEnd = 649874, XrefRangeStart = 649872, XrefRangeEnd = 649874, 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: 0x0600A023 RID: 40995 RVA: 0x0029283C File Offset: 0x00290A3C
		// 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, 100675819);
			RenderTextureFactory.NativeMethodInfoPtr_Get_Public_RenderTexture_RenderTexture_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675820);
			RenderTextureFactory.NativeMethodInfoPtr_Get_Public_RenderTexture_Int32_Int32_Int32_RenderTextureFormat_RenderTextureReadWrite_FilterMode_TextureWrapMode_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675821);
			RenderTextureFactory.NativeMethodInfoPtr_Release_Public_Void_RenderTexture_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675822);
			RenderTextureFactory.NativeMethodInfoPtr_ReleaseAll_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675823);
			RenderTextureFactory.NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RenderTextureFactory>.NativeClassPtr, 100675824);
		}

		// Token: 0x0600A024 RID: 40996 RVA: 0x0000A74C File Offset: 0x0000894C
		public RenderTextureFactory(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170035FE RID: 13822
		// (get) Token: 0x0600A025 RID: 40997 RVA: 0x002928F8 File Offset: 0x00290AF8
		// (set) Token: 0x0600A026 RID: 40998 RVA: 0x0029292C File Offset: 0x00290B2C
		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: 0x04006B84 RID: 27524
		private static readonly IntPtr NativeFieldInfoPtr_m_TemporaryRTs;

		// Token: 0x04006B85 RID: 27525
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x04006B86 RID: 27526
		private static readonly IntPtr NativeMethodInfoPtr_Get_Public_RenderTexture_RenderTexture_0;

		// Token: 0x04006B87 RID: 27527
		private static readonly IntPtr NativeMethodInfoPtr_Get_Public_RenderTexture_Int32_Int32_Int32_RenderTextureFormat_RenderTextureReadWrite_FilterMode_TextureWrapMode_String_0;

		// Token: 0x04006B88 RID: 27528
		private static readonly IntPtr NativeMethodInfoPtr_Release_Public_Void_RenderTexture_0;

		// Token: 0x04006B89 RID: 27529
		private static readonly IntPtr NativeMethodInfoPtr_ReleaseAll_Public_Void_0;

		// Token: 0x04006B8A RID: 27530
		private static readonly IntPtr NativeMethodInfoPtr_Dispose_Public_Virtual_Final_New_Void_0;
	}
}
