mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
color tint for angle mask shader
This commit is contained in:
parent
de03da7e6f
commit
0c809c828e
1 changed files with 15 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue