using System;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;

namespace UnityEngine.PostProcessing
{
	// Token: 0x02000584 RID: 1412
	[Token(Token = "0x2000584")]
	public sealed class TaaComponent : PostProcessingComponentRenderTexture<AntialiasingModel>
	{
		// Token: 0x17000358 RID: 856
		// (get) Token: 0x06003031 RID: 12337 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000358")]
		public override bool active
		{
			[Token(Token = "0x6003031")]
			[Address(RVA = "0x98ECF0", Offset = "0x98DCF0", VA = "0x18098ECF0", Slot = "5")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06003032 RID: 12338 RVA: 0x00069278 File Offset: 0x00067478
		[Token(Token = "0x6003032")]
		[Address(RVA = "0x547940", Offset = "0x546940", VA = "0x180547940", Slot = "4")]
		public override DepthTextureMode GetCameraFlags()
		{
			return DepthTextureMode.Depth | DepthTextureMode.MotionVectors;
		}

		// Token: 0x17000359 RID: 857
		// (get) Token: 0x06003033 RID: 12339 RVA: 0x000020D3 File Offset: 0x000002D3
		// (set) Token: 0x06003034 RID: 12340 RVA: 0x00069288 File Offset: 0x00067488
		[Token(Token = "0x17000359")]
		public Vector2 jitterVector
		{
			[Token(Token = "0x6003033")]
			[Address(RVA = "0x98ED70", Offset = "0x98DD70", VA = "0x18098ED70")]
			[CompilerGenerated]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6003034")]
			[Address(RVA = "0x7DFC50", Offset = "0x7DEC50", VA = "0x1807DFC50")]
			[CompilerGenerated]
			private set
			{
				this.<jitterVector>k__BackingField = value;
			}
		}

		// Token: 0x06003035 RID: 12341 RVA: 0x0006929C File Offset: 0x0006749C
		[Token(Token = "0x6003035")]
		[Address(RVA = "0x98E710", Offset = "0x98D710", VA = "0x18098E710")]
		public void ResetHistory()
		{
			this.m_ResetHistory = true;
		}

		// Token: 0x06003036 RID: 12342 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003036")]
		[Address(RVA = "0x98E720", Offset = "0x98D720", VA = "0x18098E720")]
		public void SetProjectionMatrix(Func<Vector2, Matrix4x4> jitteredFunc)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003037 RID: 12343 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003037")]
		[Address(RVA = "0x98E170", Offset = "0x98D170", VA = "0x18098E170")]
		public void Render(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003038 RID: 12344 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003038")]
		[Address(RVA = "0x98D960", Offset = "0x98C960", VA = "0x18098D960")]
		private float GetHaltonValue(int index, int radix)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003039 RID: 12345 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003039")]
		[Address(RVA = "0x98D8A0", Offset = "0x98C8A0", VA = "0x18098D8A0")]
		private Vector2 GenerateRandomOffset()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600303A RID: 12346 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600303A")]
		[Address(RVA = "0x98DB60", Offset = "0x98CB60", VA = "0x18098DB60")]
		private Matrix4x4 GetPerspectiveProjectionMatrix(Vector2 offset)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600303B RID: 12347 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600303B")]
		[Address(RVA = "0x98D9A0", Offset = "0x98C9A0", VA = "0x18098D9A0")]
		private Matrix4x4 GetOrthographicProjectionMatrix(Vector2 offset)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600303C RID: 12348 RVA: 0x000692B0 File Offset: 0x000674B0
		[Token(Token = "0x600303C")]
		[Address(RVA = "0x98E0D0", Offset = "0x98D0D0", VA = "0x18098E0D0", Slot = "7")]
		public override void OnDisable()
		{
			RenderTexture historyTexture = this.m_HistoryTexture;
			int num = 0;
			if (historyTexture != num)
			{
				RenderTexture.ReleaseTemporary(this.m_HistoryTexture);
			}
			int num2 = 0;
			this.m_HistoryTexture = num2;
			this.m_SampleIndex = num2;
			this.m_ResetHistory = true;
		}

		// Token: 0x0600303D RID: 12349 RVA: 0x000692F4 File Offset: 0x000674F4
		[Token(Token = "0x600303D")]
		[Address(RVA = "0x98EC80", Offset = "0x98DC80", VA = "0x18098EC80")]
		public TaaComponent()
		{
			RenderBuffer[] array = new RenderBuffer[2];
			this.m_MRT = array;
			this.m_ResetHistory = true;
			base..ctor();
		}

		// Token: 0x040038D1 RID: 14545
		[Token(Token = "0x40038D1")]
		private const string k_ShaderString = "Hidden/Post FX/Temporal Anti-aliasing";

		// Token: 0x040038D2 RID: 14546
		[Token(Token = "0x40038D2")]
		private const int k_SampleCount = 8;

		// Token: 0x040038D3 RID: 14547
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40038D3")]
		private readonly RenderBuffer[] m_MRT;

		// Token: 0x040038D4 RID: 14548
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40038D4")]
		private int m_SampleIndex;

		// Token: 0x040038D5 RID: 14549
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x40038D5")]
		private bool m_ResetHistory;

		// Token: 0x040038D6 RID: 14550
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x40038D6")]
		private RenderTexture m_HistoryTexture;

		// Token: 0x02000585 RID: 1413
		[Token(Token = "0x2000585")]
		private static class Uniforms
		{
			// Token: 0x040038D8 RID: 14552
			[Token(Token = "0x40038D8")]
			internal static int _Jitter = Shader.PropertyToID("_Jitter");

			// Token: 0x040038D9 RID: 14553
			[Token(Token = "0x40038D9")]
			internal static int _SharpenParameters = Shader.PropertyToID("_SharpenParameters");

			// Token: 0x040038DA RID: 14554
			[Token(Token = "0x40038DA")]
			internal static int _FinalBlendParameters = Shader.PropertyToID("_FinalBlendParameters");

			// Token: 0x040038DB RID: 14555
			[Token(Token = "0x40038DB")]
			internal static int _HistoryTex = Shader.PropertyToID("_HistoryTex");

			// Token: 0x040038DC RID: 14556
			[Token(Token = "0x40038DC")]
			internal static int _MainTex = Shader.PropertyToID("_MainTex");
		}
	}
}
