Hi, I was experimenting with this tutorial to apply setBlendingMode on a Sprite containing a shape and not a Bitmap.
http://giderosmobile.com/forum/discussion/233/tutorial-how-to-create-a-spot-light/p1I tried drawing a shape with SOLID black fill and with Texture.REPEAT, both in black and white. But I can't get it working :-< .
Maybe I am missing something but I am unable to understand what:
if you have some minutes to share can you please check the attachment and point me in the right direction?
Thank you
Comments
What did you want to achieve ?
Maybe I misunderstood the usage of "multiply" blending mode..
thank you
Original idea was:
1°) you draw a white spotlight above a black background
2°) the (full screen) logo was then multiplied by what was on the before it screen, making it appear where the spotlight was (white(1) * white -> white, white * black (0) -> black)
It could have been written has:
1°) draw anything you want in the background
2°) draw the spotlight (with multiply) above
but in that case the spotlight sprite must cover all screen, so that all pixels are blended.
I thought I misunderstood how "multiply" works.
So if there is no-pixel (outside the spotlight sprite) it can't blend because it's missing the "black" pixels? (and this is why you say that the spotlight sprite must cover all screen?)
Thank you very much
So blending applies only to areas where the GPU actually want to draw something.
thanks