|
|
| hi color pixel blending |
|
coolbool
Member #1,291
May 2001
|
I am writing a 2D 16 bpp arcade game, It uses the allegro graphics lib. |
|
Bob
Free Market Evangelist
September 2000
|
Here's a suggestion: you can create the alpha channel out of the light intensity of every color. The equation for this is: -- |
|
Gabhonga
Member #1,247
February 2001
|
stupid 50/50 averaging with one bit precision loss(tm): -------------------------------------------------------- |
|
Gabhonga
Member #1,247
February 2001
|
oops I meant 0x7F7F7F instead of EFEFEF of course hehe...and I haven't seen that you were about to go for 16 bit per pixel, my example were in 24 bpp... -------------------------------------------------------- |
|
Bob
Free Market Evangelist
September 2000
|
And 24bpp 50/50 averaging with No Bit Loss(tm) (but slower). -- |
|
coolbool
Member #1,291
May 2001
|
No, these methods dont seem to work, they give the entire glow a blackish tinge, I would suggest you download the 70k program from |
|
Bob
Free Market Evangelist
September 2000
|
Coolbool: were you refering to the luminosity-as-alpha-channel, the 50-50 transparency, or both? -- |
|
Gabhonga
Member #1,247
February 2001
|
hmm...what programs like gimp, psp or photoshop do when blending two layers together, is that they have a seperate alpha value for every single pixel, and then they blend the pictures pixelwise, not the whole layer with just one fixedalpha value. -------------------------------------------------------- |
|
Gabhonga
Member #1,247
February 2001
|
mmmh....maybe I've exagerrated a bit with the 15 hot needles and the chainsaw, I believe I could also manage to do that with just a SpOoN and some opcodes ;-) nah anyway, I was just kidding, feel free to make anything out of it, but please, if it runs fast mail me the sourcecode -------------------------------------------------------- |
|
|