using System;
using Cpp2IlInjected;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005B9 RID: 1465
	[Token(Token = "0x20005B9")]
	[ExecuteInEditMode]
	[AddComponentMenu("Image Effects/Color Adjustments/Grayscale")]
	public class Grayscale : ImageEffectBase
	{
		// Token: 0x06002F11 RID: 12049 RVA: 0x000647AC File Offset: 0x000629AC
		[Token(Token = "0x6002F11")]
		[Address(RVA = "0x1173930", Offset = "0x1172730", VA = "0x181173930")]
		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: 0x06002F12 RID: 12050 RVA: 0x00064804 File Offset: 0x00062A04
		[Token(Token = "0x6002F12")]
		[Address(RVA = "0x3FBF80", Offset = "0x3FAD80", VA = "0x1803FBF80")]
		public Grayscale()
		{
		}

		// Token: 0x040038F2 RID: 14578
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40038F2")]
		public Texture textureRamp;

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