[0]drawCallOptimize与滤镜同时使用时文本显示异常
假如不使用drawCallOptimize的话, 文本滤镜显示正常,
但是用drawCallOptimize之后前一个文本的滤镜被后一个滤镜给替换了.
简略复现代码如下:
Laya.stage.drawCallOptimize = true;
let text1 = new Laya.Text();
text1.text = "ceshi1";
Laya.stage.addChild(text1);
text1.fontSize = 40;
text1.x = 280;
text1.y = 180;
let filter1 = new Laya.ColorFilter();
filter1.setColor("#00FF7F");
text1.filters = [filter1];
let text2 = new Laya.Text();
text2.text = "ceshi2";
Laya.stage.addChild(text2);
text2.fontSize = 40;
text2.x = 280;
text2.y = 220;
let filter2 = new Laya.ColorFilter();
filter2.setColor("#00BFFF");
text2.filters = [filter2];
但是用drawCallOptimize之后前一个文本的滤镜被后一个滤镜给替换了.
简略复现代码如下:
Laya.stage.drawCallOptimize = true;
let text1 = new Laya.Text();
text1.text = "ceshi1";
Laya.stage.addChild(text1);
text1.fontSize = 40;
text1.x = 280;
text1.y = 180;
let filter1 = new Laya.ColorFilter();
filter1.setColor("#00FF7F");
text1.filters = [filter1];
let text2 = new Laya.Text();
text2.text = "ceshi2";
Laya.stage.addChild(text2);
text2.fontSize = 40;
text2.x = 280;
text2.y = 220;
let filter2 = new Laya.ColorFilter();
filter2.setColor("#00BFFF");
text2.filters = [filter2];
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
Laya_z
赞同来自: (๑•ั็ω•็ั๑)
Laya_XS
赞同来自: