Archived

This topic is now archived and is closed to further replies.

mickey

hi, i don't get it, what is the alpha values for a 32 bit color value..,

Recommended Posts

when you don't really use them on alpha blending right? coz i have this formula, newColor = ((srcColor * fade) + (destColor *(255 - fade)) >> 8; and we don't extract too the alpha values on a 32bit colors right? thanks for your ideas about this, [edited by - mickey on April 30, 2002 5:13:16 AM]

Share this post


Link to post
Share on other sites
As I understand it, some programs don''t use this extra Alpha channel, but some do. For example, in DirectX you can turn Alpha blending on, and then it will look at the alpha channel for each pixel so you can get cool transparency effects.

If it is used, then the alpha value simply tells how "opaque" that pixel is. If it is 255, then the pixel is just copied. If it''s zero, then nothing shows up. If it''s 127, then the pixel will be superimposed on the background, so the resulting color will be approximately an equal blend between the old background color and the pixel color.

Share this post


Link to post
Share on other sites
you can use the alpha to store anything in..
as you can use rgb to store anything in..

i for example use rgb in one texture to store my normal-vectors of the bumped surface in, and the alpha component to store how much of specular you see
in the second texture i use rgb to store the color at this place normally, and the alpha to store the exponent of the specular (how shiny the surface looks)

these inputvalues move into my pixelshader and calculate more or less proper lighting..

in the final screen buffer you can store alphavalues if you want for multipasses, for example store the glow in an alphavalue in the framebuffer and reuse this for glowing afterwards..

all gets programable, so its all just values.. nothing more and nothing less..

and if you code a software-engine, its all completely up to you..

"take a look around" - limp bizkit
www.google.com

Share this post


Link to post
Share on other sites
quote:

all gets programable, so its all just values.. nothing more and nothing less..



Yes, there should actually be more prgrammable channels, not just alpha, but something like R,G,B,Aux1,Aux2,Aux3, etc. Two streamable RGB channels and one alpha channel is just not enough for complex pixelshader setups

[remotely trying to kick the arse of nVidia: implement more interpolators ! ]

Share this post


Link to post
Share on other sites