using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000603 RID: 1539
	[Token(Token = "0x2000603")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Color Adjustments/Contrast Stretch")]
	public class ContrastStretch : MonoBehaviour
	{
		// Token: 0x170003A7 RID: 935
		// (get) Token: 0x060031A7 RID: 12711 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170003A7")]
		protected Material materialLum
		{
			[Token(Token = "0x60031A7")]
			[Address(RVA = "0x12EFE90", Offset = "0x12EEE90", VA = "0x1812EFE90")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170003A8 RID: 936
		// (get) Token: 0x060031A8 RID: 12712 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170003A8")]
		protected Material materialReduce
		{
			[Token(Token = "0x60031A8")]
			[Address(RVA = "0x12EFF60", Offset = "0x12EEF60", VA = "0x1812EFF60")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170003A9 RID: 937
		// (get) Token: 0x060031A9 RID: 12713 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170003A9")]
		protected Material materialAdapt
		{
			[Token(Token = "0x60031A9")]
			[Address(RVA = "0x12EFCF0", Offset = "0x12EECF0", VA = "0x1812EFCF0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170003AA RID: 938
		// (get) Token: 0x060031AA RID: 12714 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170003AA")]
		protected Material materialApply
		{
			[Token(Token = "0x60031AA")]
			[Address(RVA = "0x12EFDC0", Offset = "0x12EEDC0", VA = "0x1812EFDC0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x060031AB RID: 12715 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60031AB")]
		[Address(RVA = "0x12EFBF0", Offset = "0x12EEBF0", VA = "0x1812EFBF0")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060031AC RID: 12716 RVA: 0x0006B2C4 File Offset: 0x000694C4
		[Token(Token = "0x60031AC")]
		[Address(RVA = "0x12EF750", Offset = "0x12EE750", VA = "0x1812EF750")]
		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: 0x060031AD RID: 12717 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60031AD")]
		[Address(RVA = "0x12EF4E0", Offset = "0x12EE4E0", VA = "0x1812EF4E0")]
		private void OnDisable()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060031AE RID: 12718 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60031AE")]
		[Address(RVA = "0x12EF8C0", Offset = "0x12EE8C0", VA = "0x1812EF8C0")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060031AF RID: 12719 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60031AF")]
		[Address(RVA = "0x12EF2A0", Offset = "0x12EE2A0", VA = "0x1812EF2A0")]
		private void CalculateAdaptation(Texture curTexture)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060031B0 RID: 12720 RVA: 0x0006B324 File Offset: 0x00069524
		[Token(Token = "0x60031B0")]
		[Address(RVA = "0x12EFC80", Offset = "0x12EEC80", VA = "0x1812EFC80")]
		public ContrastStretch()
		{
			RenderTexture[] array = new RenderTexture[2];
			this.adaptRenderTex = array;
			base..ctor();
		}

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

		// Token: 0x04003B4F RID: 15183
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4003B4F")]
		[Range(0f, 1f)]
		public float limitMinimum = 0.2f;

		// Token: 0x04003B50 RID: 15184
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003B50")]
		[Range(0f, 1f)]
		public float limitMaximum = 0.6f;

		// Token: 0x04003B51 RID: 15185
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003B51")]
		private RenderTexture[] adaptRenderTex;

		// Token: 0x04003B52 RID: 15186
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003B52")]
		private int curAdaptIndex;

		// Token: 0x04003B53 RID: 15187
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003B53")]
		public Shader shaderLum;

		// Token: 0x04003B54 RID: 15188
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003B54")]
		private Material m_materialLum;

		// Token: 0x04003B55 RID: 15189
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003B55")]
		public Shader shaderReduce;

		// Token: 0x04003B56 RID: 15190
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003B56")]
		private Material m_materialReduce;

		// Token: 0x04003B57 RID: 15191
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003B57")]
		public Shader shaderAdapt;

		// Token: 0x04003B58 RID: 15192
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003B58")]
		private Material m_materialAdapt;

		// Token: 0x04003B59 RID: 15193
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003B59")]
		public Shader shaderApply;

		// Token: 0x04003B5A RID: 15194
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003B5A")]
		private Material m_materialApply;
	}
}
