2023-11-07 04:04:22 -05:00
|
|
|
package funkin.graphics.shaders;
|
2023-08-28 14:52:03 -04:00
|
|
|
|
|
|
|
import flixel.addons.display.FlxRuntimeShader;
|
|
|
|
import funkin.Paths;
|
|
|
|
import openfl.utils.Assets;
|
|
|
|
import openfl.display.BitmapData;
|
2024-02-13 03:03:11 -05:00
|
|
|
import openfl.display.ShaderInput;
|
2023-08-28 14:52:03 -04:00
|
|
|
|
|
|
|
class BlendModesShader extends FlxRuntimeShader
|
|
|
|
{
|
2024-02-13 03:03:11 -05:00
|
|
|
public var camera:ShaderInput<BitmapData>;
|
|
|
|
public var cameraData:BitmapData;
|
2023-08-28 14:52:03 -04:00
|
|
|
|
|
|
|
public function new()
|
|
|
|
{
|
|
|
|
super(Assets.getText(Paths.frag('blendModes')));
|
|
|
|
}
|
|
|
|
|
2024-02-13 03:03:11 -05:00
|
|
|
public function setCamera(cameraData:BitmapData):Void
|
2023-08-28 14:52:03 -04:00
|
|
|
{
|
2024-02-13 03:03:11 -05:00
|
|
|
this.cameraData = cameraData;
|
2023-08-28 14:52:03 -04:00
|
|
|
|
2024-02-13 03:03:11 -05:00
|
|
|
this.setBitmapData('camera', this.cameraData);
|
2023-08-28 14:52:03 -04:00
|
|
|
}
|
|
|
|
}
|