mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-25 13:45:49 +00:00
rain shader recolor support
This commit is contained in:
parent
d049478c65
commit
b58bd07fd2
|
|
@ -4,6 +4,7 @@ import flixel.system.FlxAssets.FlxShader;
|
|||
import openfl.display.BitmapData;
|
||||
import openfl.display.ShaderParameter;
|
||||
import openfl.display.ShaderParameterType;
|
||||
import flixel.util.FlxColor;
|
||||
import openfl.utils.Assets;
|
||||
|
||||
typedef Light =
|
||||
|
|
@ -94,6 +95,14 @@ class RuntimeRainShader extends RuntimePostEffectShader
|
|||
return mask = value;
|
||||
}
|
||||
|
||||
public var rainColor(default, set):FlxColor;
|
||||
|
||||
function set_rainColor(color:FlxColor):FlxColor
|
||||
{
|
||||
this.setFloatArray("uRainColor", [color.red / 255, color.green / 255, color.blue / 255]);
|
||||
return rainColor = color;
|
||||
}
|
||||
|
||||
public var lightMap(default, set):BitmapData;
|
||||
|
||||
function set_lightMap(value:BitmapData):BitmapData
|
||||
|
|
@ -113,6 +122,7 @@ class RuntimeRainShader extends RuntimePostEffectShader
|
|||
public function new()
|
||||
{
|
||||
super(Assets.getText(Paths.frag('rain')));
|
||||
this.rainColor = 0xFF6680cc;
|
||||
}
|
||||
|
||||
public function update(elapsed:Float):Void
|
||||
|
|
|
|||
Loading…
Reference in a new issue