From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 92309] Box drawn around cursor in multiple 3D games
Date: Tue, 01 Dec 2015 15:36:23 +0000 [thread overview]
Message-ID: <bug-92309-502-9tKkFqNQMK@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-92309-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 1663 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=92309
--- Comment #13 from Kamil Páral <kamil.paral@gmail.com> ---
acutiator, thanks in advanced for the effort. I have zero knowledge about all
of this, but this wikipedia article seems to be comprehensible:
https://en.wikipedia.org/wiki/Alpha_compositing
The important part:
~~~~~~~
If an alpha channel is used in an image, it is common to also multiply the
color by the alpha value, to save on additional multiplications during
compositing. This is usually referred to as premultiplied alpha.
Assuming that the pixel color is expressed using straight (non-premultiplied)
RGBA tuples, a pixel value of (0.0, 0.5, 0.0, 0.5) implies a pixel that has 50%
of the maximum green intensity and 50% opacity. If the color were fully green,
its RGBA would be (0, 1, 0, 0.5).
However, if this pixel uses premultiplied alpha, all of the RGB values (0, 1,
0) are multiplied by 0.5 and then the alpha is appended to the end to yield (0,
0.5, 0, 0.5). In this case, the 0.5 value for the G channel actually indicates
100% green intensity (with 50% opacity). For this reason, knowing whether a
file uses premultiplied or straight alpha is essential to correctly process or
composite it.
~~~~~~~
I've also found the following howtos when searching for this:
http://www.gamedev.net/topic/623481-how-to-create-pre-multiplied-alpha-for-use-with-opengl/
http://blog.qythyx.com/2014/01/premultiplied-alpha.html
Hope that helps a bit. You might wait a while whether someone more
knowledgeable gives you a better advice.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2679 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-12-01 15:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 2:16 [Bug 92309] Box drawn around cursor in multiple 3D games bugzilla-daemon
2015-10-06 2:16 ` bugzilla-daemon
2015-10-06 2:17 ` bugzilla-daemon
2015-10-06 2:21 ` bugzilla-daemon
2015-10-06 2:48 ` bugzilla-daemon
2015-10-06 2:49 ` bugzilla-daemon
2015-10-06 2:56 ` bugzilla-daemon
2015-10-21 6:04 ` bugzilla-daemon
2015-10-25 10:19 ` bugzilla-daemon
2015-10-25 10:20 ` bugzilla-daemon
2015-10-25 10:21 ` bugzilla-daemon
2015-10-27 6:23 ` bugzilla-daemon
2015-10-27 8:37 ` bugzilla-daemon
2015-12-01 15:10 ` bugzilla-daemon
2015-12-01 15:36 ` bugzilla-daemon [this message]
2015-12-02 2:45 ` bugzilla-daemon
2015-12-02 4:48 ` bugzilla-daemon
2015-12-02 15:27 ` bugzilla-daemon
2015-12-02 15:42 ` bugzilla-daemon
2015-12-02 16:17 ` bugzilla-daemon
2015-12-02 17:16 ` bugzilla-daemon
2016-07-15 14:03 ` bugzilla-daemon
2016-07-15 14:09 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-92309-502-9tKkFqNQMK@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox