using System;
using Cpp2IlInjected;
using UnityEngine.Rendering;

namespace UnityEngine.PostProcessing
{
	// Token: 0x02000562 RID: 1378
	[Token(Token = "0x2000562")]
	public sealed class AmbientOcclusionComponent : PostProcessingComponentCommandBuffer<AmbientOcclusionModel>
	{
		// Token: 0x17000344 RID: 836
		// (get) Token: 0x06002FA6 RID: 12198 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000344")]
		private AmbientOcclusionComponent.OcclusionSource occlusionSource
		{
			[Token(Token = "0x6002FA6")]
			[Address(RVA = "0xDA7F70", Offset = "0xDA6F70", VA = "0x180DA7F70")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000345 RID: 837
		// (get) Token: 0x06002FA7 RID: 12199 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000345")]
		private bool ambientOnlySupported
		{
			[Token(Token = "0x6002FA7")]
			[Address(RVA = "0xDA7ED0", Offset = "0xDA6ED0", VA = "0x180DA7ED0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000346 RID: 838
		// (get) Token: 0x06002FA8 RID: 12200 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000346")]
		public override bool active
		{
			[Token(Token = "0x6002FA8")]
			[Address(RVA = "0xDA7E60", Offset = "0xDA6E60", VA = "0x180DA7E60", Slot = "5")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06002FA9 RID: 12201 RVA: 0x00068370 File Offset: 0x00066570
		[Token(Token = "0x6002FA9")]
		[Address(RVA = "0xDA7170", Offset = "0xDA6170", VA = "0x180DA7170", Slot = "4")]
		public override DepthTextureMode GetCameraFlags()
		{
			AmbientOcclusionComponent.OcclusionSource occlusionSource = this.occlusionSource;
			if (this.occlusionSource != AmbientOcclusionComponent.OcclusionSource.GBuffer)
			{
			}
			return DepthTextureMode.Depth;
		}

		// Token: 0x06002FAA RID: 12202 RVA: 0x00068390 File Offset: 0x00066590
		[Token(Token = "0x6002FAA")]
		[Address(RVA = "0xDA71B0", Offset = "0xDA61B0", VA = "0x180DA71B0", Slot = "11")]
		public override string GetName()
		{
			return "Ambient Occlusion";
		}

		// Token: 0x06002FAB RID: 12203 RVA: 0x000683A4 File Offset: 0x000665A4
		[Token(Token = "0x6002FAB")]
		[Address(RVA = "0xDA7110", Offset = "0xDA6110", VA = "0x180DA7110", Slot = "10")]
		public override CameraEvent GetCameraEvent()
		{
			if (this.ambientOnlySupported && !this.context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.AmbientOcclusion))
			{
				return CameraEvent.BeforeReflections;
			}
			return CameraEvent.BeforeImageEffectsOpaque;
		}

		// Token: 0x06002FAC RID: 12204 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002FAC")]
		[Address(RVA = "0xDA71E0", Offset = "0xDA61E0", VA = "0x180DA71E0", Slot = "12")]
		public override void PopulateCommandBuffer(CommandBuffer cb)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002FAD RID: 12205 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002FAD")]
		[Address(RVA = "0xDA7D60", Offset = "0xDA6D60", VA = "0x180DA7D60")]
		public AmbientOcclusionComponent()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x040037F1 RID: 14321
		[Token(Token = "0x40037F1")]
		private const string k_BlitShaderString = "Hidden/Post FX/Blit";

		// Token: 0x040037F2 RID: 14322
		[Token(Token = "0x40037F2")]
		private const string k_ShaderString = "Hidden/Post FX/Ambient Occlusion";

		// Token: 0x040037F3 RID: 14323
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40037F3")]
		private readonly RenderTargetIdentifier[] m_MRT;

		// Token: 0x02000563 RID: 1379
		[Token(Token = "0x2000563")]
		private static class Uniforms
		{
			// Token: 0x040037F4 RID: 14324
			[Token(Token = "0x40037F4")]
			internal static readonly int _Intensity = Shader.PropertyToID("_Intensity");

			// Token: 0x040037F5 RID: 14325
			[Token(Token = "0x40037F5")]
			internal static readonly int _Radius = Shader.PropertyToID("_Radius");

			// Token: 0x040037F6 RID: 14326
			[Token(Token = "0x40037F6")]
			internal static readonly int _FogParams = Shader.PropertyToID("_FogParams");

			// Token: 0x040037F7 RID: 14327
			[Token(Token = "0x40037F7")]
			internal static readonly int _Downsample = Shader.PropertyToID("_Downsample");

			// Token: 0x040037F8 RID: 14328
			[Token(Token = "0x40037F8")]
			internal static readonly int _SampleCount = Shader.PropertyToID("_SampleCount");

			// Token: 0x040037F9 RID: 14329
			[Token(Token = "0x40037F9")]
			internal static readonly int _OcclusionTexture1 = Shader.PropertyToID("_OcclusionTexture1");

			// Token: 0x040037FA RID: 14330
			[Token(Token = "0x40037FA")]
			internal static readonly int _OcclusionTexture2 = Shader.PropertyToID("_OcclusionTexture2");

			// Token: 0x040037FB RID: 14331
			[Token(Token = "0x40037FB")]
			internal static readonly int _OcclusionTexture = Shader.PropertyToID("_OcclusionTexture");

			// Token: 0x040037FC RID: 14332
			[Token(Token = "0x40037FC")]
			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");

			// Token: 0x040037FD RID: 14333
			[Token(Token = "0x40037FD")]
			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");
		}

		// Token: 0x02000564 RID: 1380
		[Token(Token = "0x2000564")]
		private enum OcclusionSource
		{
			// Token: 0x040037FF RID: 14335
			[Token(Token = "0x40037FF")]
			DepthTexture,
			// Token: 0x04003800 RID: 14336
			[Token(Token = "0x4003800")]
			DepthNormalsTexture,
			// Token: 0x04003801 RID: 14337
			[Token(Token = "0x4003801")]
			GBuffer
		}
	}
}
