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

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005D2 RID: 1490
	public class Grayscale : ImageEffectBase
	{
		// Token: 0x06009C32 RID: 39986 RVA: 0x0028044C File Offset: 0x0027E64C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 620751, XrefRangeEnd = 620765, 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: 0x06009C33 RID: 39987 RVA: 0x002804C0 File Offset: 0x0027E6C0
		[CallerCount(13)]
		[CachedScanResults(RefRangeStart = 227409, RefRangeEnd = 227422, XrefRangeStart = 227409, XrefRangeEnd = 227422, 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: 0x06009C34 RID: 39988 RVA: 0x0028050C File Offset: 0x0027E70C
		// 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, 100675345);
			Grayscale.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Grayscale>.NativeClassPtr, 100675346);
		}

		// Token: 0x06009C35 RID: 39989 RVA: 0x0027BA8C File Offset: 0x00279C8C
		public Grayscale(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x1700350A RID: 13578
		// (get) Token: 0x06009C36 RID: 39990 RVA: 0x0028058C File Offset: 0x0027E78C
		// (set) Token: 0x06009C37 RID: 39991 RVA: 0x002805C0 File Offset: 0x0027E7C0
		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: 0x1700350B RID: 13579
		// (get) Token: 0x06009C38 RID: 39992 RVA: 0x002805E8 File Offset: 0x0027E7E8
		// (set) Token: 0x06009C39 RID: 39993 RVA: 0x00280610 File Offset: 0x0027E810
		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: 0x040068B5 RID: 26805
		private static readonly IntPtr NativeFieldInfoPtr_textureRamp;

		// Token: 0x040068B6 RID: 26806
		private static readonly IntPtr NativeFieldInfoPtr_rampOffset;

		// Token: 0x040068B7 RID: 26807
		private static readonly IntPtr NativeMethodInfoPtr_OnRenderImage_Private_Void_RenderTexture_RenderTexture_0;

		// Token: 0x040068B8 RID: 26808
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
