mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-23 13:48:23 +00:00
adjust color shader
This commit is contained in:
parent
73fc855f8e
commit
ad93706b1d
55
source/funkin/graphics/shaders/AdjustColorShader.hx
Normal file
55
source/funkin/graphics/shaders/AdjustColorShader.hx
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue