Hi, If the texture does not have alpha, that means we can do disable blending, do front-to-back sorting to minimize overdraw, and use depth-buffer checks to preserve stacking. So in the case where you know there is no alpha, this is an optimization. If you do not know whether or not there is an alpha, the safe choice is to assume that there is an alpha channel. Even if all the alpha values are at 100% opacity, the alpha-blending will still give the right results, whereas unblended opaque rendering will only be correct if the texture is completely opaque.
Eskil Abrahamsen Blomfeldt Senior Manager, Graphics The Qt Company Sandakerveien 116 0484 Oslo, Norway [email protected] http://qt.io ________________________________ Fra: Development <[email protected]> på vegne av JiDe Zhang <[email protected]> Sendt: onsdag 26. oktober 2022 10:13 Til: Qt邮件列表 <[email protected]> Emne: [Development] Does QSGPlainTexture needs call setHasAlphaChannel on Vulkan renderer? Hi, I am working for wlroots with Qt. In this https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3538#note_1604273 patch, I am exporting some interfaces in wlroots for vulkan, and using it with QtQuick, I want to get the has_alpha value of texture, but Simon Ser thinks we shouldn't need know has_alpha value of vulkan texture. If I don't call setHasAlphaChannel for QSGPlainTexture, and if the texture is having alpha, then I will see the wrong display effective. So, Is it a Qt bug? Although I don't think it's a Qt bug, but I can't get has alpha of texture from wlroots in vulkan. How should I do?
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
