mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-12-05 05:41:05 -05:00
24 lines
500 B
Haxe
24 lines
500 B
Haxe
|
package funkin.graphics.shaders;
|
||
|
|
||
|
import flixel.addons.display.FlxRuntimeShader;
|
||
|
import openfl.utils.Assets;
|
||
|
import funkin.Paths;
|
||
|
import flixel.math.FlxPoint;
|
||
|
|
||
|
class MosaicEffect extends FlxRuntimeShader
|
||
|
{
|
||
|
public var blockSize:FlxPoint = FlxPoint.get(1.0, 1.0);
|
||
|
|
||
|
public function new()
|
||
|
{
|
||
|
super(Assets.getText(Paths.frag('mosaic')));
|
||
|
setBlockSize(1.0, 1.0);
|
||
|
}
|
||
|
|
||
|
public function setBlockSize(w:Float, h:Float)
|
||
|
{
|
||
|
blockSize.set(w, h);
|
||
|
setFloatArray("uBlocksize", [w, h]);
|
||
|
}
|
||
|
}
|