2023-12-19 01:49:01 +00:00
|
|
|
package funkin.graphics.shaders;
|
2023-12-11 17:23:33 +00:00
|
|
|
|
|
|
|
import openfl.display.BitmapData;
|
|
|
|
import openfl.display.BlendMode;
|
|
|
|
import openfl.utils.Assets;
|
|
|
|
|
|
|
|
class RuntimeCustomBlendShader extends RuntimePostEffectShader
|
|
|
|
{
|
2023-12-19 01:49:01 +00:00
|
|
|
public var source(default, set):BitmapData;
|
2023-12-11 17:23:33 +00:00
|
|
|
|
2023-12-19 01:49:01 +00:00
|
|
|
function set_source(value:BitmapData):BitmapData
|
|
|
|
{
|
|
|
|
this.setBitmapData("source", value);
|
|
|
|
return source = value;
|
|
|
|
}
|
2023-12-11 17:23:33 +00:00
|
|
|
|
2023-12-19 01:49:01 +00:00
|
|
|
public var blend(default, set):BlendMode;
|
2023-12-11 17:23:33 +00:00
|
|
|
|
2023-12-19 01:49:01 +00:00
|
|
|
function set_blend(value:BlendMode):BlendMode
|
|
|
|
{
|
|
|
|
this.setInt("blendMode", cast value);
|
|
|
|
return blend = value;
|
|
|
|
}
|
2023-12-11 17:23:33 +00:00
|
|
|
|
2023-12-19 01:49:01 +00:00
|
|
|
public function new()
|
|
|
|
{
|
|
|
|
super(Assets.getText("assets/shaders/customBlend.frag"));
|
|
|
|
}
|
2023-12-11 17:23:33 +00:00
|
|
|
}
|