using System;
using Cpp2IlInjected;
using UnityEngine.Rendering;

namespace UnityEngine.PostProcessing
{
	// Token: 0x02000523 RID: 1315
	[Token(Token = "0x2000523")]
	public sealed class MotionBlurComponent : PostProcessingComponentCommandBuffer<MotionBlurModel>
	{
		// Token: 0x1700032F RID: 815
		// (get) Token: 0x06002D45 RID: 11589 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x1700032F")]
		public MotionBlurComponent.ReconstructionFilter reconstructionFilter
		{
			[Token(Token = "0x6002D45")]
			[Address(RVA = "0xBC8BB0", Offset = "0xBC79B0", VA = "0x180BC8BB0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000330 RID: 816
		// (get) Token: 0x06002D46 RID: 11590 RVA: 0x00061994 File Offset: 0x0005FB94
		[Token(Token = "0x17000330")]
		public MotionBlurComponent.FrameBlendingFilter frameBlendingFilter
		{
			[Token(Token = "0x6002D46")]
			[Address(RVA = "0xBC8B40", Offset = "0xBC7940", VA = "0x180BC8B40")]
			get
			{
				MotionBlurComponent.FrameBlendingFilter frameBlendingFilter = this.m_FrameBlendingFilter;
				if (frameBlendingFilter == 0)
				{
					MotionBlurComponent.FrameBlendingFilter frameBlendingFilter2 = new MotionBlurComponent.FrameBlendingFilter();
					this.m_FrameBlendingFilter = frameBlendingFilter2;
				}
				return frameBlendingFilter;
			}
		}

		// Token: 0x17000331 RID: 817
		// (get) Token: 0x06002D47 RID: 11591 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000331")]
		public override bool active
		{
			[Token(Token = "0x6002D47")]
			[Address(RVA = "0xBC8A80", Offset = "0xBC7880", VA = "0x180BC8A80", Slot = "5")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06002D48 RID: 11592 RVA: 0x000619BC File Offset: 0x0005FBBC
		[Token(Token = "0x6002D48")]
		[Address(RVA = "0xBC8240", Offset = "0xBC7040", VA = "0x180BC8240", Slot = "11")]
		public override string GetName()
		{
			return "Motion Blur";
		}

		// Token: 0x06002D49 RID: 11593 RVA: 0x000619D0 File Offset: 0x0005FBD0
		[Token(Token = "0x6002D49")]
		[Address(RVA = "0xBC8A10", Offset = "0xBC7810", VA = "0x180BC8A10")]
		public void ResetHistory()
		{
			/*
An exception occurred when decompiling this method (06002D49)

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: 0x06002D4A RID: 11594 RVA: 0x000619F0 File Offset: 0x0005FBF0
		[Token(Token = "0x6002D4A")]
		[Address(RVA = "0x51C630", Offset = "0x51B430", VA = "0x18051C630", Slot = "4")]
		public override DepthTextureMode GetCameraFlags()
		{
			return DepthTextureMode.Depth | DepthTextureMode.MotionVectors;
		}

		// Token: 0x06002D4B RID: 11595 RVA: 0x00061A00 File Offset: 0x0005FC00
		[Token(Token = "0x6002D4B")]
		[Address(RVA = "0xA45430", Offset = "0xA44230", VA = "0x180A45430", Slot = "10")]
		public override CameraEvent GetCameraEvent()
		{
			return CameraEvent.BeforeImageEffects;
		}

		// Token: 0x06002D4C RID: 11596 RVA: 0x00061A10 File Offset: 0x0005FC10
		[Token(Token = "0x6002D4C")]
		[Address(RVA = "0x434F50", Offset = "0x433D50", VA = "0x180434F50", Slot = "6")]
		public override void OnEnable()
		{
			this.m_FirstFrame = true;
		}

		// Token: 0x06002D4D RID: 11597 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002D4D")]
		[Address(RVA = "0xBC8290", Offset = "0xBC7090", VA = "0x180BC8290", Slot = "12")]
		public override void PopulateCommandBuffer(CommandBuffer cb)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002D4E RID: 11598 RVA: 0x00061A24 File Offset: 0x0005FC24
		[Token(Token = "0x6002D4E")]
		[Address(RVA = "0xBC8270", Offset = "0xBC7070", VA = "0x180BC8270", Slot = "7")]
		public override void OnDisable()
		{
			MotionBlurComponent.FrameBlendingFilter frameBlendingFilter = this.m_FrameBlendingFilter;
			if (frameBlendingFilter != 0)
			{
				frameBlendingFilter.Dispose();
				return;
			}
		}

		// Token: 0x06002D4F RID: 11599 RVA: 0x00061A44 File Offset: 0x0005FC44
		[Token(Token = "0x6002D4F")]
		[Address(RVA = "0xBC8A40", Offset = "0xBC7840", VA = "0x180BC8A40")]
		public MotionBlurComponent()
		{
		}

		// Token: 0x04003584 RID: 13700
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003584")]
		private MotionBlurComponent.ReconstructionFilter m_ReconstructionFilter;

		// Token: 0x04003585 RID: 13701
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003585")]
		private MotionBlurComponent.FrameBlendingFilter m_FrameBlendingFilter;

		// Token: 0x04003586 RID: 13702
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003586")]
		private bool m_FirstFrame = true;

		// Token: 0x02000524 RID: 1316
		[Token(Token = "0x2000524")]
		private static class Uniforms
		{
			// Token: 0x04003587 RID: 13703
			[Token(Token = "0x4003587")]
			internal static readonly int _VelocityScale = Shader.PropertyToID("_VelocityScale");

			// Token: 0x04003588 RID: 13704
			[Token(Token = "0x4003588")]
			internal static readonly int _MaxBlurRadius = Shader.PropertyToID("_MaxBlurRadius");

			// Token: 0x04003589 RID: 13705
			[Token(Token = "0x4003589")]
			internal static readonly int _RcpMaxBlurRadius = Shader.PropertyToID("_RcpMaxBlurRadius");

			// Token: 0x0400358A RID: 13706
			[Token(Token = "0x400358A")]
			internal static readonly int _VelocityTex = Shader.PropertyToID("_VelocityTex");

			// Token: 0x0400358B RID: 13707
			[Token(Token = "0x400358B")]
			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");

			// Token: 0x0400358C RID: 13708
			[Token(Token = "0x400358C")]
			internal static readonly int _Tile2RT = Shader.PropertyToID("_Tile2RT");

			// Token: 0x0400358D RID: 13709
			[Token(Token = "0x400358D")]
			internal static readonly int _Tile4RT = Shader.PropertyToID("_Tile4RT");

			// Token: 0x0400358E RID: 13710
			[Token(Token = "0x400358E")]
			internal static readonly int _Tile8RT = Shader.PropertyToID("_Tile8RT");

			// Token: 0x0400358F RID: 13711
			[Token(Token = "0x400358F")]
			internal static readonly int _TileMaxOffs = Shader.PropertyToID("_TileMaxOffs");

			// Token: 0x04003590 RID: 13712
			[Token(Token = "0x4003590")]
			internal static readonly int _TileMaxLoop = Shader.PropertyToID("_TileMaxLoop");

			// Token: 0x04003591 RID: 13713
			[Token(Token = "0x4003591")]
			internal static readonly int _TileVRT = Shader.PropertyToID("_TileVRT");

			// Token: 0x04003592 RID: 13714
			[Token(Token = "0x4003592")]
			internal static readonly int _NeighborMaxTex = Shader.PropertyToID("_NeighborMaxTex");

			// Token: 0x04003593 RID: 13715
			[Token(Token = "0x4003593")]
			internal static readonly int _LoopCount = Shader.PropertyToID("_LoopCount");

			// Token: 0x04003594 RID: 13716
			[Token(Token = "0x4003594")]
			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");

			// Token: 0x04003595 RID: 13717
			[Token(Token = "0x4003595")]
			internal static readonly int _History1LumaTex = Shader.PropertyToID("_History1LumaTex");

			// Token: 0x04003596 RID: 13718
			[Token(Token = "0x4003596")]
			internal static readonly int _History2LumaTex = Shader.PropertyToID("_History2LumaTex");

			// Token: 0x04003597 RID: 13719
			[Token(Token = "0x4003597")]
			internal static readonly int _History3LumaTex = Shader.PropertyToID("_History3LumaTex");

			// Token: 0x04003598 RID: 13720
			[Token(Token = "0x4003598")]
			internal static readonly int _History4LumaTex = Shader.PropertyToID("_History4LumaTex");

			// Token: 0x04003599 RID: 13721
			[Token(Token = "0x4003599")]
			internal static readonly int _History1ChromaTex = Shader.PropertyToID("_History1ChromaTex");

			// Token: 0x0400359A RID: 13722
			[Token(Token = "0x400359A")]
			internal static readonly int _History2ChromaTex = Shader.PropertyToID("_History2ChromaTex");

			// Token: 0x0400359B RID: 13723
			[Token(Token = "0x400359B")]
			internal static readonly int _History3ChromaTex = Shader.PropertyToID("_History3ChromaTex");

			// Token: 0x0400359C RID: 13724
			[Token(Token = "0x400359C")]
			internal static readonly int _History4ChromaTex = Shader.PropertyToID("_History4ChromaTex");

			// Token: 0x0400359D RID: 13725
			[Token(Token = "0x400359D")]
			internal static readonly int _History1Weight = Shader.PropertyToID("_History1Weight");

			// Token: 0x0400359E RID: 13726
			[Token(Token = "0x400359E")]
			internal static readonly int _History2Weight = Shader.PropertyToID("_History2Weight");

			// Token: 0x0400359F RID: 13727
			[Token(Token = "0x400359F")]
			internal static readonly int _History3Weight = Shader.PropertyToID("_History3Weight");

			// Token: 0x040035A0 RID: 13728
			[Token(Token = "0x40035A0")]
			internal static readonly int _History4Weight = Shader.PropertyToID("_History4Weight");
		}

		// Token: 0x02000525 RID: 1317
		[Token(Token = "0x2000525")]
		private enum Pass
		{
			// Token: 0x040035A2 RID: 13730
			[Token(Token = "0x40035A2")]
			VelocitySetup,
			// Token: 0x040035A3 RID: 13731
			[Token(Token = "0x40035A3")]
			TileMax1,
			// Token: 0x040035A4 RID: 13732
			[Token(Token = "0x40035A4")]
			TileMax2,
			// Token: 0x040035A5 RID: 13733
			[Token(Token = "0x40035A5")]
			TileMaxV,
			// Token: 0x040035A6 RID: 13734
			[Token(Token = "0x40035A6")]
			NeighborMax,
			// Token: 0x040035A7 RID: 13735
			[Token(Token = "0x40035A7")]
			Reconstruction,
			// Token: 0x040035A8 RID: 13736
			[Token(Token = "0x40035A8")]
			FrameCompression,
			// Token: 0x040035A9 RID: 13737
			[Token(Token = "0x40035A9")]
			FrameBlendingChroma,
			// Token: 0x040035AA RID: 13738
			[Token(Token = "0x40035AA")]
			FrameBlendingRaw
		}

		// Token: 0x02000526 RID: 1318
		[Token(Token = "0x2000526")]
		public class ReconstructionFilter
		{
			// Token: 0x06002D51 RID: 11601 RVA: 0x00061BF4 File Offset: 0x0005FDF4
			[Token(Token = "0x6002D51")]
			[Address(RVA = "0x6A0D50", Offset = "0x69FB50", VA = "0x1806A0D50")]
			public ReconstructionFilter()
			{
				if (!SystemInfo.SupportsRenderTextureFormat(this.m_PackedRTFormat))
				{
					this.m_PackedRTFormat = (RenderTextureFormat)((ulong)0L);
				}
			}

			// Token: 0x06002D52 RID: 11602 RVA: 0x00061C34 File Offset: 0x0005FE34
			[Token(Token = "0x6002D52")]
			[Address(RVA = "0x6A0320", Offset = "0x69F120", VA = "0x1806A0320")]
			private void CheckTextureFormatSupport()
			{
				if (!SystemInfo.SupportsRenderTextureFormat(this.m_PackedRTFormat))
				{
					this.m_PackedRTFormat = (RenderTextureFormat)((ulong)0L);
				}
			}

			// Token: 0x06002D53 RID: 11603 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D53")]
			[Address(RVA = "0x6A0350", Offset = "0x69F150", VA = "0x1806A0350")]
			public bool IsSupported()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002D54 RID: 11604 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D54")]
			[Address(RVA = "0x6A0360", Offset = "0x69F160", VA = "0x1806A0360")]
			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: 0x040035AB RID: 13739
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40035AB")]
			private RenderTextureFormat m_VectorRTFormat = (RenderTextureFormat)((ulong)13L);

			// Token: 0x040035AC RID: 13740
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x40035AC")]
			private RenderTextureFormat m_PackedRTFormat = (RenderTextureFormat)((ulong)8L);
		}

		// Token: 0x02000527 RID: 1319
		[Token(Token = "0x2000527")]
		public class FrameBlendingFilter
		{
			// Token: 0x06002D55 RID: 11605 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D55")]
			[Address(RVA = "0x69E9E0", Offset = "0x69D7E0", VA = "0x18069E9E0")]
			public FrameBlendingFilter()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002D56 RID: 11606 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D56")]
			[Address(RVA = "0x69E6D0", Offset = "0x69D4D0", VA = "0x18069E6D0")]
			public void Dispose()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002D57 RID: 11607 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D57")]
			[Address(RVA = "0x69E8A0", Offset = "0x69D6A0", VA = "0x18069E8A0")]
			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: 0x06002D58 RID: 11608 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D58")]
			[Address(RVA = "0x69E090", Offset = "0x69CE90", VA = "0x18069E090")]
			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: 0x06002D59 RID: 11609 RVA: 0x00061C58 File Offset: 0x0005FE58
			[Token(Token = "0x6002D59")]
			[Address(RVA = "0x69E6A0", Offset = "0x69D4A0", VA = "0x18069E6A0")]
			private static bool CheckSupportCompression()
			{
				bool flag = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.R8);
				if (!flag)
				{
					return flag;
				}
				return SystemInfo.supportedRenderTargetCount > 1;
			}

			// Token: 0x06002D5A RID: 11610 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D5A")]
			[Address(RVA = "0x69E7D0", Offset = "0x69D5D0", VA = "0x18069E7D0")]
			private static RenderTextureFormat GetPreferredRenderTextureFormat()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002D5B RID: 11611 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002D5B")]
			[Address(RVA = "0x69E750", Offset = "0x69D550", VA = "0x18069E750")]
			private MotionBlurComponent.FrameBlendingFilter.Frame GetFrameRelative(int offset)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x040035AD RID: 13741
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40035AD")]
			private bool m_UseCompression;

			// Token: 0x040035AE RID: 13742
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x40035AE")]
			private RenderTextureFormat m_RawTextureFormat;

			// Token: 0x040035AF RID: 13743
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x40035AF")]
			private MotionBlurComponent.FrameBlendingFilter.Frame[] m_FrameList;

			// Token: 0x040035B0 RID: 13744
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x40035B0")]
			private int m_LastFrameCount;

			// Token: 0x02000528 RID: 1320
			[Token(Token = "0x2000528")]
			private struct Frame
			{
				// Token: 0x06002D5C RID: 11612 RVA: 0x00061C80 File Offset: 0x0005FE80
				[Token(Token = "0x6002D5C")]
				[Address(RVA = "0x132CC70", Offset = "0x132BA70", VA = "0x18132CC70")]
				public float CalculateWeight(float strength, float currentTime)
				{
					return 0f;
				}

				// Token: 0x06002D5D RID: 11613 RVA: 0x0003883F File Offset: 0x00036A3F
				[Token(Token = "0x6002D5D")]
				[Address(RVA = "0x132D1A0", Offset = "0x132BFA0", VA = "0x18132D1A0")]
				public void Release()
				{
				}

				// Token: 0x06002D5E RID: 11614 RVA: 0x0003883F File Offset: 0x00036A3F
				[Token(Token = "0x6002D5E")]
				[Address(RVA = "0x132CE80", Offset = "0x132BC80", VA = "0x18132CE80")]
				public void MakeRecord(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, Material material)
				{
				}

				// Token: 0x06002D5F RID: 11615 RVA: 0x0003883F File Offset: 0x00036A3F
				[Token(Token = "0x6002D5F")]
				[Address(RVA = "0x132CCF0", Offset = "0x132BAF0", VA = "0x18132CCF0")]
				public void MakeRecordRaw(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, RenderTextureFormat format)
				{
				}

				// Token: 0x040035B1 RID: 13745
				[FieldOffset(Offset = "0x0")]
				[Token(Token = "0x40035B1")]
				public RenderTexture lumaTexture;

				// Token: 0x040035B2 RID: 13746
				[FieldOffset(Offset = "0x8")]
				[Token(Token = "0x40035B2")]
				public RenderTexture chromaTexture;

				// Token: 0x040035B3 RID: 13747
				[FieldOffset(Offset = "0x10")]
				[Token(Token = "0x40035B3")]
				private float m_Time;

				// Token: 0x040035B4 RID: 13748
				[FieldOffset(Offset = "0x18")]
				[Token(Token = "0x40035B4")]
				private RenderTargetIdentifier[] m_MRT;
			}
		}
	}
}
