@:src({
var calculatedUV:Vec2;
var pixelColor:Vec4;
@input var input:{ var uv : Vec2};
@param var texture:Sampler2D;
@param var uvScale:Vec2;
@param var uvDelta:Vec2;
@const var useAlphaChannel:Bool;
@const @param var useSourceUVs:Bool = false;
function fragment() {
var uv = useSourceUVs ? input.uv : calculatedUV;
uv = uv * uvScale + uvDelta;
if (useAlphaChannel) pixelColor.a *= texture.get(uv).a else pixelColor.a *= texture.get(uv).b;
};
})@:build(hxsl.Macros.buildShader())@:autoBuild(hxsl.Macros.buildShader())