using System;
using Cpp2IlInjected;
using UnityEngine.Rendering;

namespace UnityEngine.PostProcessing
{
	// Token: 0x0200050A RID: 1290
	[Token(Token = "0x200050A")]
	public sealed class AmbientOcclusionComponent : PostProcessingComponentCommandBuffer<AmbientOcclusionModel>
	{
		// Token: 0x1700031F RID: 799
		// (get) Token: 0x06002CDD RID: 11485 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x1700031F")]
		private AmbientOcclusionComponent.OcclusionSource occlusionSource
		{
			[Token(Token = "0x6002CDD")]
			[Address(RVA = "0x11E4D30", Offset = "0x11E3B30", VA = "0x1811E4D30")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000320 RID: 800
		// (get) Token: 0x06002CDE RID: 11486 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000320")]
		private bool ambientOnlySupported
		{
			[Token(Token = "0x6002CDE")]
			[Address(RVA = "0x11E4C90", Offset = "0x11E3A90", VA = "0x1811E4C90")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000321 RID: 801
		// (get) Token: 0x06002CDF RID: 11487 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000321")]
		public override bool active
		{
			[Token(Token = "0x6002CDF")]
			[Address(RVA = "0x11E4C20", Offset = "0x11E3A20", VA = "0x1811E4C20", Slot = "5")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06002CE0 RID: 11488 RVA: 0x000610DC File Offset: 0x0005F2DC
		[Token(Token = "0x6002CE0")]
		[Address(RVA = "0x11E3F30", Offset = "0x11E2D30", VA = "0x1811E3F30", Slot = "4")]
		public override DepthTextureMode GetCameraFlags()
		{
			AmbientOcclusionComponent.OcclusionSource occlusionSource = this.occlusionSource;
			if (this.occlusionSource != AmbientOcclusionComponent.OcclusionSource.GBuffer)
			{
			}
			return DepthTextureMode.Depth;
		}

		// Token: 0x06002CE1 RID: 11489 RVA: 0x000610FC File Offset: 0x0005F2FC
		[Token(Token = "0x6002CE1")]
		[Address(RVA = "0x11E3F70", Offset = "0x11E2D70", VA = "0x1811E3F70", Slot = "11")]
		public override string GetName()
		{
			return "Ambient Occlusion";
		}

		// Token: 0x06002CE2 RID: 11490 RVA: 0x00061110 File Offset: 0x0005F310
		[Token(Token = "0x6002CE2")]
		[Address(RVA = "0x11E3ED0", Offset = "0x11E2CD0", VA = "0x1811E3ED0", Slot = "10")]
		public override CameraEvent GetCameraEvent()
		{
			if (this.ambientOnlySupported && !this.context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.AmbientOcclusion))
			{
				return CameraEvent.BeforeReflections;
			}
			return CameraEvent.BeforeImageEffectsOpaque;
		}

		// Token: 0x06002CE3 RID: 11491 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CE3")]
		[Address(RVA = "0x11E3FA0", Offset = "0x11E2DA0", VA = "0x1811E3FA0", Slot = "12")]
		public override void PopulateCommandBuffer(CommandBuffer cb)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CE4 RID: 11492 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CE4")]
		[Address(RVA = "0x11E4B20", Offset = "0x11E3920", VA = "0x1811E4B20")]
		public AmbientOcclusionComponent()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003507 RID: 13575
		[Token(Token = "0x4003507")]
		private const string k_BlitShaderString = "Hidden/Post FX/Blit";

		// Token: 0x04003508 RID: 13576
		[Token(Token = "0x4003508")]
		private const string k_ShaderString = "Hidden/Post FX/Ambient Occlusion";

		// Token: 0x04003509 RID: 13577
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003509")]
		private readonly RenderTargetIdentifier[] m_MRT;

		// Token: 0x0200050B RID: 1291
		[Token(Token = "0x200050B")]
		private static class Uniforms
		{
			// Token: 0x0400350A RID: 13578
			[Token(Token = "0x400350A")]
			internal static readonly int _Intensity = Shader.PropertyToID("_Intensity");

			// Token: 0x0400350B RID: 13579
			[Token(Token = "0x400350B")]
			internal static readonly int _Radius = Shader.PropertyToID("_Radius");

			// Token: 0x0400350C RID: 13580
			[Token(Token = "0x400350C")]
			internal static readonly int _FogParams = Shader.PropertyToID("_FogParams");

			// Token: 0x0400350D RID: 13581
			[Token(Token = "0x400350D")]
			internal static readonly int _Downsample = Shader.PropertyToID("_Downsample");

			// Token: 0x0400350E RID: 13582
			[Token(Token = "0x400350E")]
			internal static readonly int _SampleCount = Shader.PropertyToID("_SampleCount");

			// Token: 0x0400350F RID: 13583
			[Token(Token = "0x400350F")]
			internal static readonly int _OcclusionTexture1 = Shader.PropertyToID("_OcclusionTexture1");

			// Token: 0x04003510 RID: 13584
			[Token(Token = "0x4003510")]
			internal static readonly int _OcclusionTexture2 = Shader.PropertyToID("_OcclusionTexture2");

			// Token: 0x04003511 RID: 13585
			[Token(Token = "0x4003511")]
			internal static readonly int _OcclusionTexture = Shader.PropertyToID("_OcclusionTexture");

			// Token: 0x04003512 RID: 13586
			[Token(Token = "0x4003512")]
			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");

			// Token: 0x04003513 RID: 13587
			[Token(Token = "0x4003513")]
			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");
		}

		// Token: 0x0200050C RID: 1292
		[Token(Token = "0x200050C")]
		private enum OcclusionSource
		{
			// Token: 0x04003515 RID: 13589
			[Token(Token = "0x4003515")]
			DepthTexture,
			// Token: 0x04003516 RID: 13590
			[Token(Token = "0x4003516")]
			DepthNormalsTexture,
			// Token: 0x04003517 RID: 13591
			[Token(Token = "0x4003517")]
			GBuffer
		}
	}
}
