using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000620 RID: 1568
	[Token(Token = "0x2000620")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Rendering/Sun Shafts")]
	[RequireComponent(typeof(Camera))]
	public class SunShafts : PostEffectsBase
	{
		// Token: 0x0600321F RID: 12831 RVA: 0x0006C1FC File Offset: 0x0006A3FC
		[Token(Token = "0x600321F")]
		[Address(RVA = "0x989290", Offset = "0x988290", VA = "0x180989290", Slot = "4")]
		public override bool CheckResources()
		{
			bool flag = this.useDepthTexture;
			bool flag2 = base.CheckSupport(flag);
			Material material = this.sunShaftsMaterial;
			Shader shader = this.sunShaftsShader;
			Material material2 = base.CheckShaderAndCreateMaterial(shader, material);
			this.sunShaftsMaterial = material2;
			Material material3 = this.simpleClearMaterial;
			Shader shader2 = this.simpleClearShader;
			Material material4 = base.CheckShaderAndCreateMaterial(shader2, material3);
			this.simpleClearMaterial = material4;
			bool isSupported = this.isSupported;
			if (!isSupported)
			{
				base.ReportAutoDisable();
			}
			return isSupported;
		}

		// Token: 0x06003220 RID: 12832 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003220")]
		[Address(RVA = "0x989320", Offset = "0x988320", VA = "0x180989320")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003221 RID: 12833 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003221")]
		[Address(RVA = "0x989D10", Offset = "0x988D10", VA = "0x180989D10")]
		public SunShafts()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003C2F RID: 15407
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003C2F")]
		public SunShafts.SunShaftsResolution resolution;

		// Token: 0x04003C30 RID: 15408
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003C30")]
		public SunShafts.ShaftsScreenBlendMode screenBlendMode;

		// Token: 0x04003C31 RID: 15409
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003C31")]
		public Transform sunTransform;

		// Token: 0x04003C32 RID: 15410
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003C32")]
		public int radialBlurIterations;

		// Token: 0x04003C33 RID: 15411
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4003C33")]
		public Color sunColor;

		// Token: 0x04003C34 RID: 15412
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4003C34")]
		public Color sunThreshold;

		// Token: 0x04003C35 RID: 15413
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x4003C35")]
		public float sunShaftBlurRadius;

		// Token: 0x04003C36 RID: 15414
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003C36")]
		public float sunShaftIntensity;

		// Token: 0x04003C37 RID: 15415
		[FieldOffset(Offset = "0x64")]
		[Token(Token = "0x4003C37")]
		public float maxRadius;

		// Token: 0x04003C38 RID: 15416
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003C38")]
		public bool useDepthTexture;

		// Token: 0x04003C39 RID: 15417
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003C39")]
		public Shader sunShaftsShader;

		// Token: 0x04003C3A RID: 15418
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4003C3A")]
		private Material sunShaftsMaterial;

		// Token: 0x04003C3B RID: 15419
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4003C3B")]
		public Shader simpleClearShader;

		// Token: 0x04003C3C RID: 15420
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x4003C3C")]
		private Material simpleClearMaterial;

		// Token: 0x02000621 RID: 1569
		[Token(Token = "0x2000621")]
		public enum SunShaftsResolution
		{
			// Token: 0x04003C3E RID: 15422
			[Token(Token = "0x4003C3E")]
			Low,
			// Token: 0x04003C3F RID: 15423
			[Token(Token = "0x4003C3F")]
			Normal,
			// Token: 0x04003C40 RID: 15424
			[Token(Token = "0x4003C40")]
			High
		}

		// Token: 0x02000622 RID: 1570
		[Token(Token = "0x2000622")]
		public enum ShaftsScreenBlendMode
		{
			// Token: 0x04003C42 RID: 15426
			[Token(Token = "0x4003C42")]
			Screen,
			// Token: 0x04003C43 RID: 15427
			[Token(Token = "0x4003C43")]
			Add
		}
	}
}
