using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005C8 RID: 1480
	[Token(Token = "0x20005C8")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Camera))]
	[AddComponentMenu("Image Effects/Rendering/Sun Shafts")]
	public class SunShafts : PostEffectsBase
	{
		// Token: 0x06002F56 RID: 12118 RVA: 0x00064F2C File Offset: 0x0006312C
		[Token(Token = "0x6002F56")]
		[Address(RVA = "0xAB8770", Offset = "0xAB7570", VA = "0x180AB8770", 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: 0x06002F57 RID: 12119 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F57")]
		[Address(RVA = "0xAB8800", Offset = "0xAB7600", VA = "0x180AB8800")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F58 RID: 12120 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F58")]
		[Address(RVA = "0xAB91F0", Offset = "0xAB7FF0", VA = "0x180AB91F0")]
		public SunShafts()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003945 RID: 14661
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003945")]
		public SunShafts.SunShaftsResolution resolution;

		// Token: 0x04003946 RID: 14662
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003946")]
		public SunShafts.ShaftsScreenBlendMode screenBlendMode;

		// Token: 0x04003947 RID: 14663
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003947")]
		public Transform sunTransform;

		// Token: 0x04003948 RID: 14664
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003948")]
		public int radialBlurIterations;

		// Token: 0x04003949 RID: 14665
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4003949")]
		public Color sunColor;

		// Token: 0x0400394A RID: 14666
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x400394A")]
		public Color sunThreshold;

		// Token: 0x0400394B RID: 14667
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x400394B")]
		public float sunShaftBlurRadius;

		// Token: 0x0400394C RID: 14668
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x400394C")]
		public float sunShaftIntensity;

		// Token: 0x0400394D RID: 14669
		[FieldOffset(Offset = "0x64")]
		[Token(Token = "0x400394D")]
		public float maxRadius;

		// Token: 0x0400394E RID: 14670
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x400394E")]
		public bool useDepthTexture;

		// Token: 0x0400394F RID: 14671
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x400394F")]
		public Shader sunShaftsShader;

		// Token: 0x04003950 RID: 14672
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4003950")]
		private Material sunShaftsMaterial;

		// Token: 0x04003951 RID: 14673
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4003951")]
		public Shader simpleClearShader;

		// Token: 0x04003952 RID: 14674
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x4003952")]
		private Material simpleClearMaterial;

		// Token: 0x020005C9 RID: 1481
		[Token(Token = "0x20005C9")]
		public enum SunShaftsResolution
		{
			// Token: 0x04003954 RID: 14676
			[Token(Token = "0x4003954")]
			Low,
			// Token: 0x04003955 RID: 14677
			[Token(Token = "0x4003955")]
			Normal,
			// Token: 0x04003956 RID: 14678
			[Token(Token = "0x4003956")]
			High
		}

		// Token: 0x020005CA RID: 1482
		[Token(Token = "0x20005CA")]
		public enum ShaftsScreenBlendMode
		{
			// Token: 0x04003958 RID: 14680
			[Token(Token = "0x4003958")]
			Screen,
			// Token: 0x04003959 RID: 14681
			[Token(Token = "0x4003959")]
			Add
		}
	}
}
