I did a couple of searches and didnt see any answer for this so here goes. I have been playing with setting different alpha modes for blending an image and i havent been able to get the effect im looking for. I know how to do it all manually by updating pixels but i was hoping there was a way to do it without resorting to that =). I have a Buffered Image that Im using for a background. Then I have a grayscale image for a light map I want white to basically be 100% transparent and the shades of gray to black to to darken the pixels behind them. I think I have tied all the blending modes with no luck but am I just missing something? It actually looks pretty decent except blening pure white makes the background look washed out in those areas.
Not easy - what you really need is a multiplicative blend, but that needs a pixel shader.
You may get away with a ‘subtractive’ blend if you invert the lightmap - so black is ‘clear’ (no change to undlying colour) and white will end up as black. You sometimes get some funny colours appearing though, but its not too bad usually
All in all, your probably best doing it yourself with the pixels & rebuilding the image - at least that way you can do it right
- Dom