soften shadow

Blitz3D Forums/Blitz3D Programming/soften shadow

mouss38(Posted 2003) [#1]
how to use the alpha channel for sprites??
I want to use a round shadow with soften edges but i don't know which is the format to use : tga? png? and how to do?


Rob Farley(Posted 2003) [#2]
You've got a couple of options.

Option 1, any format.
Start with a plain white image, put a black (or grey) spot on it and blur it to hell. Use multiply blend mode (alpha doesn't work with multiply so the closer to white the spot is the more subtle the shadow will be)

Option 2, PNG.
Create a black (or grey) spot on a layer in PSP or something, blur it to hell, save it with transparancy, load it into blitz with loadtexture("shadow.png",2)


jhocking(Posted 2003) [#3]
For a shadow go with option 1 (with a grey spot.) Since what you want is to darken not replace the underlying pixels, multiply blend mode will give you a nice shadow.