how to unveil a picture in andengine
Recently i discovered andengine and I'm playing a little with it. I would like to put a picture in background and cover it with 开发者_如何转开发a solid colored rectangle, and be able to cut out polygon shaped parts from the rectangle to unveil the portion of the underlying picture corresponding to that polygon... I hope I explained myself. I'm not focusing on the polygon shape, it could also be a rectangle or a circle. Thx in advance for your suggestions
this is a more complex problem than it sounds. You could play around with some uncommon Blendfunctions. This could work like drawing the uncovered polygons first and blending the image only where there is a high saturation or so...
Alternatively you would seek for sth like a RenderTexture and dynamically make it more transparent where it is touched. This requires the FBO Extension, which is a core part of GLES2 and optional on GLES1.
I hope this helped :-)
Best Regards, Nicolas
精彩评论