Decompiled source of SuperGlassesMCD v1.0.0

SuperGlasses.dll

Decompiled 7 hours ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using MelonLoader;
using MelonLoader.Preferences;
using UnityEngine;
using superglassesmcd;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("SuperGlassessMCD")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SuperGlassessMCD")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7f3a9c21-4d8e-4b6f-9a1c-8e2f5d7b3c90")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: MelonInfo(typeof(blindasabatman), "SuperGlassessMCD", "1.0.1", "bayturtleking", null)]
[assembly: MelonGame("SUPERHOT_Team", "SHMCD")]
[assembly: AssemblyVersion("1.0.1.0")]
namespace superglassesmcd;

public static class buildinfo
{
	public const string name = "SuperGlassessMCD";

	public const string version = "1.0.0";

	public const string author = "bayturtleking";
}
public class blindasabatman : MelonMod
{
	public static MelonPreferences_Category configcategory;

	public static MelonPreferences_Entry<float> squintlevelentry;

	public override void OnInitializeMelon()
	{
		configcategory = MelonPreferences.CreateCategory("SuperGlassesMCD");
		squintlevelentry = configcategory.CreateEntry<float>("squintlevel", 0.05f, "How Blurry", "Lower value is more blur. 0.01 is max, 1 is almost normal. Washed out effects will still apply, even with 1 as a value for this.", false, false, (ValueValidator)null, (string)null);
	}

	public override void OnUpdate()
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Expected O, but got Unknown
		Camera[] allCameras = Camera.allCameras;
		foreach (Camera val in allCameras)
		{
			if ((Object)((Component)val).GetComponent<imaginehavingglasses>() == (Object)null)
			{
				((Component)val).gameObject.AddComponent<imaginehavingglasses>();
			}
		}
	}
}
public class imaginehavingglasses : MonoBehaviour
{
	public float milkbathstrength = 0.05f;

	private Texture2D gotmilk;

	private void Awake()
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Expected O, but got Unknown
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		gotmilk = new Texture2D(1, 1);
		gotmilk.SetPixel(0, 0, Color.white);
		gotmilk.Apply();
	}

	private void OnRenderImage(RenderTexture src, RenderTexture dest)
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Expected O, but got Unknown
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Expected O, but got Unknown
		float value = blindasabatman.squintlevelentry.Value;
		int num = Mathf.Max(2, (int)((float)((Texture)src).width * value));
		int num2 = Mathf.Max(2, (int)((float)((Texture)src).height * value));
		RenderTexture temporary = RenderTexture.GetTemporary(num, num2, 0, src.format);
		((Texture)temporary).filterMode = (FilterMode)1;
		Graphics.Blit((Texture)src, temporary);
		Graphics.Blit((Texture)temporary, dest);
		RenderTexture.ReleaseTemporary(temporary);
	}

	private void OnGUI()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Expected O, but got Unknown
		Color color = GUI.color;
		GUI.color = new Color(1f, 1f, 1f, milkbathstrength);
		GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), (Texture)gotmilk);
		GUI.color = color;
	}
}