mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 07:27:12 +00:00
32 lines
806 B
Haxe
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"));
|
|
}
|
|
}
|