using System;
using Cpp2IlInjected;
using UnityEngine.Rendering;

namespace UnityEngine.PostProcessing
{
	// Token: 0x0200057B RID: 1403
	[Token(Token = "0x200057B")]
	public sealed class MotionBlurComponent : PostProcessingComponentCommandBuffer<MotionBlurModel>
	{
		// Token: 0x17000354 RID: 852
		// (get) Token: 0x0600300E RID: 12302 RVA: 0x00068C28 File Offset: 0x00066E28
		[Token(Token = "0x17000354")]
		public MotionBlurComponent.ReconstructionFilter reconstructionFilter
		{
			[Token(Token = "0x600300E")]
			[Address(RVA = "0xC33860", Offset = "0xC32860", VA = "0x180C33860")]
			get
			{
				MotionBlurComponent.ReconstructionFilter reconstructionFilter = this.m_ReconstructionFilter;
				if (reconstructionFilter == 0)
				{
					MotionBlurComponent.ReconstructionFilter reconstructionFilter2 = new MotionBlurComponent.ReconstructionFilter();
					this.m_ReconstructionFilter = reconstructionFilter2;
				}
				return reconstructionFilter;
			}
		}

		// Token: 0x17000355 RID: 853
		// (get) Token: 0x0600300F RID: 12303 RVA: 0x00068C50 File Offset: 0x00066E50
		[Token(Token = "0x17000355")]
		public MotionBlurComponent.FrameBlendingFilter frameBlendingFilter
		{
			[Token(Token = "0x600300F")]
			[Address(RVA = "0xC337F0", Offset = "0xC327F0", VA = "0x180C337F0")]
			get
			{
				MotionBlurComponent.FrameBlendingFilter frameBlendingFilter = this.m_FrameBlendingFilter;
				if (frameBlendingFilter == 0)
				{
					MotionBlurComponent.FrameBlendingFilter frameBlendingFilter2 = new MotionBlurComponent.FrameBlendingFilter();
					this.m_FrameBlendingFilter = frameBlendingFilter2;
				}
				return frameBlendingFilter;
			}
		}

		// Token: 0x17000356 RID: 854
		// (get) Token: 0x06003010 RID: 12304 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000356")]
		public override bool active
		{
			[Token(Token = "0x6003010")]
			[Address(RVA = "0xC33730", Offset = "0xC32730", VA = "0x180C33730", Slot = "5")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06003011 RID: 12305 RVA: 0x00068C78 File Offset: 0x00066E78
		[Token(Token = "0x6003011")]
		[Address(RVA = "0xC32EF0", Offset = "0xC31EF0", VA = "0x180C32EF0", Slot = "11")]
		public override string GetName()
		{
			return "Motion Blur";
		}

		// Token: 0x06003012 RID: 12306 RVA: 0x00068C8C File Offset: 0x00066E8C
		[Token(Token = "0x6003012")]
		[Address(RVA = "0xC336C0", Offset = "0xC326C0", VA = "0x180C336C0")]
		public void ResetHistory()
		{
			/*
An exception occurred when decompiling this method (06003012)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void UnityEngine.PostProcessing.MotionBlurComponent::ResetHistory()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	call:void(FrameBlendingFilter::Dispose, ldloc:FrameBlendingFilter(var_0_06)); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
		}

		// Token: 0x06003013 RID: 12307 RVA: 0x00068CAC File Offset: 0x00066EAC
		[Token(Token = "0x6003013")]
		[Address(RVA = "0x547940", Offset = "0x546940", VA = "0x180547940", Slot = "4")]
		public override DepthTextureMode GetCameraFlags()
		{
			return DepthTextureMode.Depth | DepthTextureMode.MotionVectors;
		}

		// Token: 0x06003014 RID: 12308 RVA: 0x00068CBC File Offset: 0x00066EBC
		[Token(Token = "0x6003014")]
		[Address(RVA = "0xB46160", Offset = "0xB45160", VA = "0x180B46160", Slot = "10")]
		public override CameraEvent GetCameraEvent()
		{
			return CameraEvent.BeforeImageEffects;
		}

		// Token: 0x06003015 RID: 12309 RVA: 0x00068CCC File Offset: 0x00066ECC
		[Token(Token = "0x6003015")]
		[Address(RVA = "0x50F3F0", Offset = "0x50E3F0", VA = "0x18050F3F0", Slot = "6")]
		public override void OnEnable()
		{
			this.m_FirstFrame = true;
		}

		// Token: 0x06003016 RID: 12310 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003016")]
		[Address(RVA = "0xC32F40", Offset = "0xC31F40", VA = "0x180C32F40", Slot = "12")]
		public override void PopulateCommandBuffer(CommandBuffer cb)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003017 RID: 12311 RVA: 0x00068CE0 File Offset: 0x00066EE0
		[Token(Token = "0x6003017")]
		[Address(RVA = "0xC32F20", Offset = "0xC31F20", VA = "0x180C32F20", Slot = "7")]
		public override void OnDisable()
		{
			MotionBlurComponent.FrameBlendingFilter frameBlendingFilter = this.m_FrameBlendingFilter;
			if (frameBlendingFilter != 0)
			{
				frameBlendingFilter.Dispose();
				return;
			}
		}

		// Token: 0x06003018 RID: 12312 RVA: 0x00068D00 File Offset: 0x00066F00
		[Token(Token = "0x6003018")]
		[Address(RVA = "0xC336F0", Offset = "0xC326F0", VA = "0x180C336F0")]
		public MotionBlurComponent()
		{
		}

		// Token: 0x0400386E RID: 14446
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x400386E")]
		private MotionBlurComponent.ReconstructionFilter m_ReconstructionFilter;

		// Token: 0x0400386F RID: 14447
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400386F")]
		private MotionBlurComponent.FrameBlendingFilter m_FrameBlendingFilter;

		// Token: 0x04003870 RID: 14448
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003870")]
		private bool m_FirstFrame = true;

		// Token: 0x0200057C RID: 1404
		[Token(Token = "0x200057C")]
		private static class Uniforms
		{
			// Token: 0x04003871 RID: 14449
			[Token(Token = "0x4003871")]
			internal static readonly int _VelocityScale = Shader.PropertyToID("_VelocityScale");

			// Token: 0x04003872 RID: 14450
			[Token(Token = "0x4003872")]
			internal static readonly int _MaxBlurRadius = Shader.PropertyToID("_MaxBlurRadius");

			// Token: 0x04003873 RID: 14451
			[Token(Token = "0x4003873")]
			internal static readonly int _RcpMaxBlurRadius = Shader.PropertyToID("_RcpMaxBlurRadius");

			// Token: 0x04003874 RID: 14452
			[Token(Token = "0x4003874")]
			internal static readonly int _VelocityTex = Shader.PropertyToID("_VelocityTex");

			// Token: 0x04003875 RID: 14453
			[Token(Token = "0x4003875")]
			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");

			// Token: 0x04003876 RID: 14454
			[Token(Token = "0x4003876")]
			internal static readonly int _Tile2RT = Shader.PropertyToID("_Tile2RT");

			// Token: 0x04003877 RID: 14455
			[Token(Token = "0x4003877")]
			internal static readonly int _Tile4RT = Shader.PropertyToID("_Tile4RT");

			// Token: 0x04003878 RID: 14456
			[Token(Token = "0x4003878")]
			internal static readonly int _Tile8RT = Shader.PropertyToID("_Tile8RT");

			// Token: 0x04003879 RID: 14457
			[Token(Token = "0x4003879")]
			internal static readonly int _TileMaxOffs = Shader.PropertyToID("_TileMaxOffs");

			// Token: 0x0400387A RID: 14458
			[Token(Token = "0x400387A")]
			internal static readonly int _TileMaxLoop = Shader.PropertyToID("_TileMaxLoop");

			// Token: 0x0400387B RID: 14459
			[Token(Token = "0x400387B")]
			internal static readonly int _TileVRT = Shader.PropertyToID("_TileVRT");

			// Token: 0x0400387C RID: 14460
			[Token(Token = "0x400387C")]
			internal static readonly int _NeighborMaxTex = Shader.PropertyToID("_NeighborMaxTex");

			// Token: 0x0400387D RID: 14461
			[Token(Token = "0x400387D")]
			internal static readonly int _LoopCount = Shader.PropertyToID("_LoopCount");

			// Token: 0x0400387E RID: 14462
			[Token(Token = "0x400387E")]
			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");

			// Token: 0x0400387F RID: 14463
			[Token(Token = "0x400387F")]
			internal static readonly int _History1LumaTex = Shader.PropertyToID("_History1LumaTex");

			// Token: 0x04003880 RID: 14464
			[Token(Token = "0x4003880")]
			internal static readonly int _History2LumaTex = Shader.PropertyToID("_History2LumaTex");

			// Token: 0x04003881 RID: 14465
			[Token(Token = "0x4003881")]
			internal static readonly int _History3LumaTex = Shader.PropertyToID("_History3LumaTex");

			// Token: 0x04003882 RID: 14466
			[Token(Token = "0x4003882")]
			internal static readonly int _History4LumaTex = Shader.PropertyToID("_History4LumaTex");

			// Token: 0x04003883 RID: 14467
			[Token(Token = "0x4003883")]
			internal static readonly int _History1ChromaTex = Shader.PropertyToID("_History1ChromaTex");

			// Token: 0x04003884 RID: 14468
			[Token(Token = "0x4003884")]
			internal static readonly int _History2ChromaTex = Shader.PropertyToID("_History2ChromaTex");

			// Token: 0x04003885 RID: 14469
			[Token(Token = "0x4003885")]
			internal static readonly int _History3ChromaTex = Shader.PropertyToID("_History3ChromaTex");

			// Token: 0x04003886 RID: 14470
			[Token(Token = "0x4003886")]
			internal static readonly int _History4ChromaTex = Shader.PropertyToID("_History4ChromaTex");

			// Token: 0x04003887 RID: 14471
			[Token(Token = "0x4003887")]
			internal static readonly int _History1Weight = Shader.PropertyToID("_History1Weight");

			// Token: 0x04003888 RID: 14472
			[Token(Token = "0x4003888")]
			internal static readonly int _History2Weight = Shader.PropertyToID("_History2Weight");

			// Token: 0x04003889 RID: 14473
			[Token(Token = "0x4003889")]
			internal static readonly int _History3Weight = Shader.PropertyToID("_History3Weight");

			// Token: 0x0400388A RID: 14474
			[Token(Token = "0x400388A")]
			internal static readonly int _History4Weight = Shader.PropertyToID("_History4Weight");
		}

		// Token: 0x0200057D RID: 1405
		[Token(Token = "0x200057D")]
		private enum Pass
		{
			// Token: 0x0400388C RID: 14476
			[Token(Token = "0x400388C")]
			VelocitySetup,
			// Token: 0x0400388D RID: 14477
			[Token(Token = "0x400388D")]
			TileMax1,
			// Token: 0x0400388E RID: 14478
			[Token(Token = "0x400388E")]
			TileMax2,
			// Token: 0x0400388F RID: 14479
			[Token(Token = "0x400388F")]
			TileMaxV,
			// Token: 0x04003890 RID: 14480
			[Token(Token = "0x4003890")]
			NeighborMax,
			// Token: 0x04003891 RID: 14481
			[Token(Token = "0x4003891")]
			Reconstruction,
			// Token: 0x04003892 RID: 14482
			[Token(Token = "0x4003892")]
			FrameCompression,
			// Token: 0x04003893 RID: 14483
			[Token(Token = "0x4003893")]
			FrameBlendingChroma,
			// Token: 0x04003894 RID: 14484
			[Token(Token = "0x4003894")]
			FrameBlendingRaw
		}

		// Token: 0x0200057E RID: 1406
		[Token(Token = "0x200057E")]
		public class ReconstructionFilter
		{
			// Token: 0x0600301A RID: 12314 RVA: 0x00068EB0 File Offset: 0x000670B0
			[Token(Token = "0x600301A")]
			[Address(RVA = "0x69C580", Offset = "0x69B580", VA = "0x18069C580")]
			public ReconstructionFilter()
			{
				if (!SystemInfo.SupportsRenderTextureFormat(this.m_PackedRTFormat))
				{
					this.m_PackedRTFormat = (RenderTextureFormat)((ulong)0L);
				}
			}

			// Token: 0x0600301B RID: 12315 RVA: 0x00068EF0 File Offset: 0x000670F0
			[Token(Token = "0x600301B")]
			[Address(RVA = "0x69BB50", Offset = "0x69AB50", VA = "0x18069BB50")]
			private void CheckTextureFormatSupport()
			{
				if (!SystemInfo.SupportsRenderTextureFormat(this.m_PackedRTFormat))
				{
					this.m_PackedRTFormat = (RenderTextureFormat)((ulong)0L);
				}
			}

			// Token: 0x0600301C RID: 12316 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600301C")]
			[Address(RVA = "0x69BB80", Offset = "0x69AB80", VA = "0x18069BB80")]
			public bool IsSupported()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x0600301D RID: 12317 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600301D")]
			[Address(RVA = "0x69BB90", Offset = "0x69AB90", VA = "0x18069BB90")]
			public void ProcessImage(PostProcessingContext context, CommandBuffer cb, ref MotionBlurModel.Settings settings, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x04003895 RID: 14485
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003895")]
			private RenderTextureFormat m_VectorRTFormat = (RenderTextureFormat)((ulong)13L);

			// Token: 0x04003896 RID: 14486
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x4003896")]
			private RenderTextureFormat m_PackedRTFormat = (RenderTextureFormat)((ulong)8L);
		}

		// Token: 0x0200057F RID: 1407
		[Token(Token = "0x200057F")]
		public class FrameBlendingFilter
		{
			// Token: 0x0600301E RID: 12318 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600301E")]
			[Address(RVA = "0x6994D0", Offset = "0x6984D0", VA = "0x1806994D0")]
			public FrameBlendingFilter()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x0600301F RID: 12319 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600301F")]
			[Address(RVA = "0x6991C0", Offset = "0x6981C0", VA = "0x1806991C0")]
			public void Dispose()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06003020 RID: 12320 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6003020")]
			[Address(RVA = "0x699390", Offset = "0x698390", VA = "0x180699390")]
			public void PushFrame(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, Material material)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06003021 RID: 12321 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6003021")]
			[Address(RVA = "0x698B80", Offset = "0x697B80", VA = "0x180698B80")]
			public void BlendFrames(CommandBuffer cb, float strength, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06003022 RID: 12322 RVA: 0x00068F14 File Offset: 0x00067114
			[Token(Token = "0x6003022")]
			[Address(RVA = "0x699190", Offset = "0x698190", VA = "0x180699190")]
			private static bool CheckSupportCompression()
			{
				bool flag = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.R8);
				if (!flag)
				{
					return flag;
				}
				return SystemInfo.supportedRenderTargetCount > 1;
			}

			// Token: 0x06003023 RID: 12323 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6003023")]
			[Address(RVA = "0x6992C0", Offset = "0x6982C0", VA = "0x1806992C0")]
			private static RenderTextureFormat GetPreferredRenderTextureFormat()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06003024 RID: 12324 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6003024")]
			[Address(RVA = "0x699240", Offset = "0x698240", VA = "0x180699240")]
			private MotionBlurComponent.FrameBlendingFilter.Frame GetFrameRelative(int offset)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x04003897 RID: 14487
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003897")]
			private bool m_UseCompression;

			// Token: 0x04003898 RID: 14488
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x4003898")]
			private RenderTextureFormat m_RawTextureFormat;

			// Token: 0x04003899 RID: 14489
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4003899")]
			private MotionBlurComponent.FrameBlendingFilter.Frame[] m_FrameList;

			// Token: 0x0400389A RID: 14490
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x400389A")]
			private int m_LastFrameCount;

			// Token: 0x02000580 RID: 1408
			[Token(Token = "0x2000580")]
			private struct Frame
			{
				// Token: 0x06003025 RID: 12325 RVA: 0x00068F3C File Offset: 0x0006713C
				[Token(Token = "0x6003025")]
				[Address(RVA = "0x6C7F00", Offset = "0x6C6F00", VA = "0x1806C7F00")]
				public float CalculateWeight(float strength, float currentTime)
				{
					return 0f;
				}

				// Token: 0x06003026 RID: 12326 RVA: 0x0003DF9B File Offset: 0x0003C19B
				[Token(Token = "0x6003026")]
				[Address(RVA = "0x6C8430", Offset = "0x6C7430", VA = "0x1806C8430")]
				public void Release()
				{
				}

				// Token: 0x06003027 RID: 12327 RVA: 0x0003DF9B File Offset: 0x0003C19B
				[Token(Token = "0x6003027")]
				[Address(RVA = "0x6C8110", Offset = "0x6C7110", VA = "0x1806C8110")]
				public void MakeRecord(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, Material material)
				{
				}

				// Token: 0x06003028 RID: 12328 RVA: 0x0003DF9B File Offset: 0x0003C19B
				[Token(Token = "0x6003028")]
				[Address(RVA = "0x6C7F80", Offset = "0x6C6F80", VA = "0x1806C7F80")]
				public void MakeRecordRaw(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, RenderTextureFormat format)
				{
				}

				// Token: 0x0400389B RID: 14491
				[FieldOffset(Offset = "0x0")]
				[Token(Token = "0x400389B")]
				public RenderTexture lumaTexture;

				// Token: 0x0400389C RID: 14492
				[FieldOffset(Offset = "0x8")]
				[Token(Token = "0x400389C")]
				public RenderTexture chromaTexture;

				// Token: 0x0400389D RID: 14493
				[FieldOffset(Offset = "0x10")]
				[Token(Token = "0x400389D")]
				private float m_Time;

				// Token: 0x0400389E RID: 14494
				[FieldOffset(Offset = "0x18")]
				[Token(Token = "0x400389E")]
				private RenderTargetIdentifier[] m_MRT;
			}
		}
	}
}
