OT: Alpha Blending » Sale » FORUM lowesmall.shop
FORUM lowesmall.shop

FORUM lowesmall.shop



ПоискПоиск   Users   Registration   Entrance
Today: 02.06.2025 - 09:32:20
Pages:  1  

OT: Alpha Blending

Advertising


AuthorMessage

bassrebel

main user




Statistics:
Messages: 2,139
Registration: 12.11.2003

What about that: DestPixel = Pixel1 + ((Pixel2 - Pixel1) * AlphaPixel) / 255; or even: DestPixel = Pixel1 + (((Pixel2 - Pixel1) * AlphaPixel) * 257) >> 16; (257 is approx. 65536/255)

---------------------
Follow me on Instragram @bassrebel 2003 2014 X1 X3.5i 2016 MB C300 4Matic
Message # 1 27.01.23 - 19:07:36
RE: OT: Alpha Blending

poser

main user




Statistics:
Messages: 3,890
Registration: 09.03.2003

trbarry: Range isn't optional, it's an 8bit value. dividee: "DestPixel = Pixel1 + ((Pixel2 - Pixel1) * AlphaPixel) / 255;" Exact same speed as my original foruma, I guess the compiler optimizes it to match. "DestPixel = Pixel1 + (((Pixel2 - Pixel1) * AlphaPixel) * 257) >> 16;" Inaccurate, similar inaccuracy to just shifting.

---------------------
big chad + drunk wimmenz = FTMFW jarod + sterling + tom = ROFL
Message # 2 27.01.23 - 19:12:05
RE: OT: Alpha Blending

Stinky

main user




Statistics:
Messages: 86
Registration: 10.03.2003

Inaccurate? It shouldn't be. Probably a rounding problem: DestPixel = Pixel1 + (((Pixel2 - Pixel1) * AlphaPixel) * 257 + 32768) >> 16;

---------------------
Message # 3 27.01.23 - 19:23:44
RE: OT: Alpha Blending

MudPhud

main user




Statistics:
Messages: 4
Registration: 05.10.2002

Nothing beats premultiplied colors with invertedly stored alpha channel :) DestPixel = (Pixel1*iAlphaPixel >> 8) + Pixel2;

---------------------
Message # 4 27.01.23 - 19:31:36
RE: OT: Alpha Blending
External Hard Drive Recommended For Recording? : Previous topicNext topic: TL Labs Fauxlder questions/probs
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants