Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add premultiply alpha processing to the render flow. #6451

Merged
merged 3 commits into from May 8, 2020

Conversation

caryliu1999
Copy link
Contributor

@caryliu1999 caryliu1999 commented Mar 30, 2020

增加预乘alpha的处理

关联PR:cocos/engine-native#2343

论坛问题反馈:https://forum.cocos.org/t/bug-blend-one-one/83923/2

@2youyou2
Copy link
Contributor

关联下 issue? 提到 2.4 吧?

let color = null;
if (this.srcBlendFactor === cc.macro.BlendFactor.ONE) {
Color.premultiplyAlpha(_temp_color, this.node._color);
color = _temp_color._val;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里会发生类型的转化,从非 int 转换成 int,可能会影响 jit 性能。建议 let color 初始化为整型

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里会发生类型的转化,从非 int 转换成 int,可能会影响 jit 性能。建议 let color 初始化为整型

已修改

@caryliu1999
Copy link
Contributor Author

关联下 issue? 提到 2.4 吧?

关联了论坛问题链接,可以提到2.4

@holycanvas holycanvas changed the base branch from v2.3.3-release to v2.4.0 April 8, 2020 11:48
@jareguo jareguo merged commit 78a78b2 into cocos:v2.4.0 May 8, 2020
@caryliu1999 caryliu1999 deleted the v2.3.3-release-add-alpha branch June 22, 2021 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants