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