From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 92309] Box drawn around cursor in multiple 3D games Date: Tue, 01 Dec 2015 15:36:23 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1015692751==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 17C4F6E866 for ; Tue, 1 Dec 2015 07:36:23 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1015692751== Content-Type: multipart/alternative; boundary="1448984183.BAfAEa0.21460"; charset="UTF-8" --1448984183.BAfAEa0.21460 Date: Tue, 1 Dec 2015 15:36:22 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D92309 --- Comment #13 from Kamil P=C3=A1ral --- acutiator, thanks in advanced for the effort. I have zero knowledge about a= ll 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-premultiplie= d) 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 gre= en, 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 indica= tes 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. --=20 You are receiving this mail because: You are the assignee for the bug. --1448984183.BAfAEa0.21460 Date: Tue, 1 Dec 2015 15:36:23 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Commen= t # 13 on bug 92309<= /a> from Kamil P=C3=A1ral
acutiator, thanks in advanced for the effort. I have zero know=
ledge about all
of this, but this wikipedia article seems to be comprehensible:
https://en.wiki=
pedia.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-premultiplie=
d)
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 gre=
en,
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 indica=
tes
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-cre=
ate-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: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1448984183.BAfAEa0.21460-- --===============1015692751== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1015692751==--