2023-11-07 09:04:22 +00:00
|
|
|
package funkin.graphics.shaders;
|
2023-08-14 06:49:18 +00:00
|
|
|
|
|
|
|
import flixel.addons.display.FlxRuntimeShader;
|
|
|
|
import funkin.Paths;
|
|
|
|
import openfl.utils.Assets;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Note... not actually gaussian!
|
|
|
|
*/
|
|
|
|
class GaussianBlurShader extends FlxRuntimeShader
|
|
|
|
{
|
|
|
|
public var amount:Float;
|
|
|
|
|
|
|
|
public function new(amount:Float = 1.0)
|
|
|
|
{
|
|
|
|
super(Assets.getText(Paths.frag("gaussianBlur")));
|
|
|
|
setAmount(amount);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setAmount(value:Float):Void
|
|
|
|
{
|
|
|
|
this.amount = value;
|
2024-03-28 01:32:13 +00:00
|
|
|
this.setFloat("_amount", amount);
|
2023-08-14 06:49:18 +00:00
|
|
|
}
|
|
|
|
}
|