1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Fix comment and alpha test node oopsies from #14852

This commit is contained in:
DS 2024-08-16 22:01:16 +02:00 committed by GitHub
parent 9046379b30
commit 603eb57943
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 10 deletions

View file

@ -371,14 +371,12 @@ void blitBaseImage(video::IImage* &src, video::IImage* &dst)
namespace {
/** Calculate the color of a single pixel drawn on top of another pixel without
* gamma correction
/** Calculate the result of the overlay texture modifier (`^`) for a single
* pixel
*
* The color mixing is a little more complicated than just
* video::SColor::getInterpolated because getInterpolated does not handle alpha
* correctly.
* For example, a pixel with alpha=64 drawn atop a pixel with alpha=128 should
* yield a pixel with alpha=160, while getInterpolated would yield alpha=96.
* This is not alpha blending if both src and dst are semi-transparent. The
* reason this is that an old implementation did it wrong, and fixing it would
* break backwards compatibility (see #14847).
*
* \tparam overlay If enabled, only modify dst_col if it is fully opaque
* \param src_col Color of the top pixel