diff --git a/source/funkin/graphics/shaders/AngleMask.hx b/source/funkin/graphics/shaders/AngleMask.hx index c5ef87b72..ce27311cd 100644 --- a/source/funkin/graphics/shaders/AngleMask.hx +++ b/source/funkin/graphics/shaders/AngleMask.hx @@ -1,12 +1,25 @@ package funkin.graphics.shaders; import flixel.system.FlxAssets.FlxShader; +import flixel.util.FlxColor; class AngleMask extends FlxShader { + public var extraColor(default, set):FlxColor = 0xFFFFFFFF; + + function set_extraColor(value:FlxColor):FlxColor + { + extraTint.value = [value.redFloat, value.greenFloat, value.blueFloat]; + this.extraColor = value; + + return this.extraColor; + } + @:glFragmentSource(' #pragma header + uniform vec3 extraTint; + uniform vec2 endPosition; vec2 hash22(vec2 p) { vec3 p3 = fract(vec3(p.xyx) * vec3(.1031, .1030, .0973)); @@ -69,6 +82,7 @@ class AngleMask extends FlxShader void main() { vec4 col = antialias(openfl_TextureCoordv); + col.xyz = col.xyz * extraTint.xyz; // col.xyz = gamma(col.xyz); gl_FragColor = col; }') @@ -77,5 +91,6 @@ class AngleMask extends FlxShader super(); endPosition.value = [90, 100]; // 100 AS DEFAULT WORKS NICELY FOR FREEPLAY? + extraTint.value = [1, 1, 1]; } }