From ad93706b1df16f8191e839b6920da4e5e316c071 Mon Sep 17 00:00:00 2001
From: FabsTheFabs <flamingkitty24@gmail.com>
Date: Thu, 18 Jul 2024 05:23:37 +0100
Subject: [PATCH] adjust color shader

---
 .../graphics/shaders/AdjustColorShader.hx     | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 source/funkin/graphics/shaders/AdjustColorShader.hx

diff --git a/source/funkin/graphics/shaders/AdjustColorShader.hx b/source/funkin/graphics/shaders/AdjustColorShader.hx
new file mode 100644
index 000000000..2b0970eeb
--- /dev/null
+++ b/source/funkin/graphics/shaders/AdjustColorShader.hx
@@ -0,0 +1,55 @@
+package funkin.graphics.shaders;
+
+import flixel.addons.display.FlxRuntimeShader;
+import funkin.Paths;
+import openfl.utils.Assets;
+
+class AdjustColorShader extends FlxRuntimeShader
+{
+  public var hue(default, set):Float;
+  public var saturation(default, set):Float;
+  public var brightness(default, set):Float;
+  public var contrast(default, set):Float;
+
+  public function new()
+  {
+    super(Assets.getText(Paths.frag('adjustColor')));
+    // FlxG.debugger.addTrackerProfile(new TrackerProfile(HSVShader, ['hue', 'saturation', 'brightness', 'contrast']));
+    hue = 0;
+    saturation = 0;
+    brightness = 0;
+    contrast = 0;
+  }
+
+  function set_hue(value:Float):Float
+  {
+    this.setFloat('hue', value);
+    this.hue = value;
+
+    return this.hue;
+  }
+
+  function set_saturation(value:Float):Float
+  {
+    this.setFloat('saturation', value);
+    this.saturation = value;
+
+    return this.saturation;
+  }
+
+  function set_brightness(value:Float):Float
+  {
+    this.setFloat('brightness', value);
+    this.brightness = value;
+
+    return this.brightness;
+  }
+
+  function set_contrast(value:Float):Float
+  {
+    this.setFloat('contrast', value);
+    this.contrast = value;
+
+    return this.contrast;
+  }
+}