1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-13 02:02:46 +00:00
Funkin/source/funkin/graphics/shaders/RuntimeCustomBlendShader.hx
2024-02-13 03:32:20 -05:00

32 lines
806 B
Haxe

package funkin.graphics.shaders;
import openfl.display.BitmapData;
import openfl.display.BlendMode;
import openfl.utils.Assets;
class RuntimeCustomBlendShader extends RuntimePostEffectShader
{
// only different name purely for hashlink fix
public var sourceSwag(default, set):BitmapData;
function set_sourceSwag(value:BitmapData):BitmapData
{
this.setBitmapData("sourceSwag", value);
return sourceSwag = value;
}
// name change make sure it's not the same variable name as whatever is in the shader file
public var blendSwag(default, set):BlendMode;
function set_blendSwag(value:BlendMode):BlendMode
{
this.setInt("blendMode", cast value);
return blendSwag = value;
}
public function new()
{
super(Assets.getText("assets/shaders/customBlend.frag"));
}
}