I would use render texture for this. It allows you to use image files as a brush. And it's quite fast. The idea is to use render texture as a mask. You start with black texture. Whenever player touches the screen you render your brush image to this texture. But this feature (render textures) is available only in Unity Pro.
You can still use texture as a mask if you don't want to buy Unity Pro. But this will be definitely slower than render textures. How much slower I don't know. The options are:
- Create ordinary texture (Texture2D) and use SetPixel or SetPixels to update mask when player touches the screen. If you want to go this way, I would recommend to use much smaller texture than the screen size (4x, 8x depends on the quality you want to get). Otherwise it will be damn slow.
- Create ordinary texture (Texture2D) and use ReadPixels. This works pretty much the same way as render textures but it's slower. This technique is explained here.
Using render texture (requires Unity Pro)
Ok. I've made an example: https://drive.google.com/folderview?id=0B60e_iFEZd1-RlB4LVN6NE84clU&usp=sharing There are:
- Image that player needs to clear from dust: Image.jpg
- Image of dust that we draw on top of it: Dust.png
- Image that we use as an erasing brush: Brush.png
- Our render texture that we use as mask for dust: Mask.renderTexture
- Shader that we use to update the mask: MaskConstruction.shader
- Shader that we use to render dust (it combines Dust.png and render texture): Masked.shader
- Script that brings everything to life: MaskCamera.cs
- Main scene: Main.unity