using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x0200062A RID: 1578
	public class Grayscale : ImageEffectBase
	{
		// Token: 0x0600A485 RID: 42117 RVA: 0x002A3188 File Offset: 0x002A1388
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 653053, XrefRangeEnd = 653067, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void OnRenderImage(RenderTexture source, RenderTexture destination)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(source);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(destination);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Grayscale.NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A486 RID: 42118 RVA: 0x002A31FC File Offset: 0x002A13FC
		[CallerCount(13)]
		[CachedScanResults(RefRangeStart = 235327, RefRangeEnd = 235340, XrefRangeStart = 235327, XrefRangeEnd = 235340, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Grayscale()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<Grayscale>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Grayscale.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A487 RID: 42119 RVA: 0x002A3248 File Offset: 0x002A1448
		// Note: this type is marked as 'beforefieldinit'.
		static Grayscale()
		{
			Il2CppClassPointerStore<Grayscale>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "UnityStandardAssets.ImageEffects", "Grayscale");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<Grayscale>.NativeClassPtr);
			Grayscale.NativeFieldInfoPtr_textureRamp = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Grayscale>.NativeClassPtr, "textureRamp");
			Grayscale.NativeFieldInfoPtr_rampOffset = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Grayscale>.NativeClassPtr, "rampOffset");
			Grayscale.NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Grayscale>.NativeClassPtr, 100676058);
			Grayscale.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Grayscale>.NativeClassPtr, 100676059);
		}

		// Token: 0x0600A488 RID: 42120 RVA: 0x0029E7C8 File Offset: 0x0029C9C8
		public Grayscale(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170037A5 RID: 14245
		// (get) Token: 0x0600A489 RID: 42121 RVA: 0x002A32C8 File Offset: 0x002A14C8
		// (set) Token: 0x0600A48A RID: 42122 RVA: 0x002A32FC File Offset: 0x002A14FC
		public unsafe Texture textureRamp
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(Grayscale.NativeFieldInfoPtr_textureRamp);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Texture(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(Grayscale.NativeFieldInfoPtr_textureRamp), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x170037A6 RID: 14246
		// (get) Token: 0x0600A48B RID: 42123 RVA: 0x002A3324 File Offset: 0x002A1524
		// (set) Token: 0x0600A48C RID: 42124 RVA: 0x002A334C File Offset: 0x002A154C
		public unsafe float rampOffset
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(Grayscale.NativeFieldInfoPtr_rampOffset);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(Grayscale.NativeFieldInfoPtr_rampOffset)) = value;
			}
		}

		// Token: 0x04006E5E RID: 28254
		private static readonly IntPtr NativeFieldInfoPtr_textureRamp;

		// Token: 0x04006E5F RID: 28255
		private static readonly IntPtr NativeFieldInfoPtr_rampOffset;

		// Token: 0x04006E60 RID: 28256
		private static readonly IntPtr NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0;

		// Token: 0x04006E61 RID: 28257
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
