简体   繁体   English

浅色Cocos2dx上的GL混合

[英]GL Blending on light color Cocos2dx

I am using CCBlade in my game from here which creates a blade effect on swipe, it works great on black screen. 我从这里 CCBlade在我的游戏中使用CCBlade ,它会在滑动时创建刀片效果,在黑屏上效果很好。 But I got a problem when I tried to use it in lighter color screen, my game has light blue sky color . 但是当我尝试在较浅的彩色屏幕中使用它时,我遇到了一个问题,我的游戏具有浅蓝色的天空颜色 I think there is something to do with the blending which CCBlade using. 我认为与CCBlade使用的blending CCBlade It is currently using 目前正在使用

GL::blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

What could be the correct combination? 什么是正确的组合? So that the blade effect is visible on light color. 这样叶片效果在浅色上可见。 See the image below for more clarification 请参阅下图以获取更多说明

在此处输入图片说明

Thanks. 谢谢。

尽管我在融合自己方面没有太多经验,但是我会在当前项目中使用这个出色的在线工具来根据自己的需要找到合适的融合选项,不要害羞地尝试一下, 这里也有些理论

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM