using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000611 RID: 1553
	[Token(Token = "0x2000611")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Color Adjustments/Grayscale")]
	public class Grayscale : ImageEffectBase
	{
		// Token: 0x060031DA RID: 12762 RVA: 0x0006BA68 File Offset: 0x00069C68
		[Token(Token = "0x60031DA")]
		[Address(RVA = "0x16FA000", Offset = "0x16F9000", VA = "0x1816FA000")]
		private void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			Material material = base.material;
			Texture texture = this.textureRamp;
			material.SetTexture("_RampTex", texture);
			Material material2 = base.material;
			float num = this.rampOffset;
			material2.SetFloat("_RampOffset", num);
			Material material3 = base.material;
			Graphics.Blit(source, destination, material3);
		}

		// Token: 0x060031DB RID: 12763 RVA: 0x0006BAC0 File Offset: 0x00069CC0
		[Token(Token = "0x60031DB")]
		[Address(RVA = "0x41ED30", Offset = "0x41DD30", VA = "0x18041ED30")]
		public Grayscale()
		{
		}

		// Token: 0x04003BDC RID: 15324
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003BDC")]
		public Texture textureRamp;

		// Token: 0x04003BDD RID: 15325
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003BDD")]
		[Range(-1f, 1f)]
		public float rampOffset;
	}
}
