[0]重写sprite 之后,自定义 shader 在 微信小游戏平台不显示。无法加载~
public customRender(context: Laya.Context, x: number, y: number) {
if (!context || !this.tex) return;
context.drawTarget(
this.tex as any,
x + this.offsetX, // 渲染起点(距离舞台偏移---图片坐标x + 图片在纹理中的偏移)
y + this.offsetY, // 渲染起点(距离舞台偏移)
this.width, // 渲染宽度(图片宽度)
this.height, // 渲染高度
null,
this.shaderValue, // 使用的shader
this.uv // 纹理uv
);
}
if (!context || !this.tex) return;
context.drawTarget(
this.tex as any,
x + this.offsetX, // 渲染起点(距离舞台偏移---图片坐标x + 图片在纹理中的偏移)
y + this.offsetY, // 渲染起点(距离舞台偏移)
this.width, // 渲染宽度(图片宽度)
this.height, // 渲染高度
null,
this.shaderValue, // 使用的shader
this.uv // 纹理uv
);
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
小高
赞同来自: