using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005AB RID: 1451
	[Token(Token = "0x20005AB")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Color Adjustments/Contrast Stretch")]
	public class ContrastStretch : MonoBehaviour
	{
		// Token: 0x17000382 RID: 898
		// (get) Token: 0x06002EDE RID: 11998 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000382")]
		protected Material materialLum
		{
			[Token(Token = "0x6002EDE")]
			[Address(RVA = "0xE91F10", Offset = "0xE90D10", VA = "0x180E91F10")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000383 RID: 899
		// (get) Token: 0x06002EDF RID: 11999 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000383")]
		protected Material materialReduce
		{
			[Token(Token = "0x6002EDF")]
			[Address(RVA = "0xE91FE0", Offset = "0xE90DE0", VA = "0x180E91FE0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000384 RID: 900
		// (get) Token: 0x06002EE0 RID: 12000 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000384")]
		protected Material materialAdapt
		{
			[Token(Token = "0x6002EE0")]
			[Address(RVA = "0xE91D70", Offset = "0xE90B70", VA = "0x180E91D70")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000385 RID: 901
		// (get) Token: 0x06002EE1 RID: 12001 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000385")]
		protected Material materialApply
		{
			[Token(Token = "0x6002EE1")]
			[Address(RVA = "0xE91E40", Offset = "0xE90C40", VA = "0x180E91E40")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06002EE2 RID: 12002 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EE2")]
		[Address(RVA = "0xE91C70", Offset = "0xE90A70", VA = "0x180E91C70")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EE3 RID: 12003 RVA: 0x00064008 File Offset: 0x00062208
		[Token(Token = "0x6002EE3")]
		[Address(RVA = "0xE917D0", Offset = "0xE905D0", VA = "0x180E917D0")]
		private void OnEnable()
		{
			int num;
			RenderTexture renderTexture;
			do
			{
				num = 0;
				if (this.adaptRenderTex[num])
				{
					goto IL_49;
				}
				RenderTexture[] array = this.adaptRenderTex;
				int num2;
				renderTexture = new RenderTexture(1, 1, num2);
				num2 = 0;
			}
			while (renderTexture != 0 && renderTexture == 0);
			throw new IndexOutOfRangeException();
			IL_49:
			num++;
		}

		// Token: 0x06002EE4 RID: 12004 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EE4")]
		[Address(RVA = "0xE91560", Offset = "0xE90360", VA = "0x180E91560")]
		private void OnDisable()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EE5 RID: 12005 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EE5")]
		[Address(RVA = "0xE91940", Offset = "0xE90740", VA = "0x180E91940")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EE6 RID: 12006 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EE6")]
		[Address(RVA = "0xE91320", Offset = "0xE90120", VA = "0x180E91320")]
		private void CalculateAdaptation(Texture curTexture)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EE7 RID: 12007 RVA: 0x00064068 File Offset: 0x00062268
		[Token(Token = "0x6002EE7")]
		[Address(RVA = "0xE91D00", Offset = "0xE90B00", VA = "0x180E91D00")]
		public ContrastStretch()
		{
			RenderTexture[] array = new RenderTexture[2];
			this.adaptRenderTex = array;
			base..ctor();
		}

		// Token: 0x04003864 RID: 14436
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003864")]
		[Range(0.0001f, 1f)]
		public float adaptationSpeed = 0.02f;

		// Token: 0x04003865 RID: 14437
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4003865")]
		[Range(0f, 1f)]
		public float limitMinimum = 0.2f;

		// Token: 0x04003866 RID: 14438
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003866")]
		[Range(0f, 1f)]
		public float limitMaximum = 0.6f;

		// Token: 0x04003867 RID: 14439
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003867")]
		private RenderTexture[] adaptRenderTex;

		// Token: 0x04003868 RID: 14440
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003868")]
		private int curAdaptIndex;

		// Token: 0x04003869 RID: 14441
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003869")]
		public Shader shaderLum;

		// Token: 0x0400386A RID: 14442
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x400386A")]
		private Material m_materialLum;

		// Token: 0x0400386B RID: 14443
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x400386B")]
		public Shader shaderReduce;

		// Token: 0x0400386C RID: 14444
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x400386C")]
		private Material m_materialReduce;

		// Token: 0x0400386D RID: 14445
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x400386D")]
		public Shader shaderAdapt;

		// Token: 0x0400386E RID: 14446
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x400386E")]
		private Material m_materialAdapt;

		// Token: 0x0400386F RID: 14447
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x400386F")]
		public Shader shaderApply;

		// Token: 0x04003870 RID: 14448
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003870")]
		private Material m_materialApply;
	}
}
