Hello, I'm making a game which requires some custom drawing. Basically I have one sprite placed on top of another, and I want to programmatically create multiple rectangle holes in the top sprite in order to reveal the one underneath as the game goes on. What do I need to do in order to achieve this? Thank you.
either render-to-texture (rendertextures in pro, or readpixels in free), or draw to the texture in main memory (e.g. byte array) and do setpixels32() and apply() to upload the changes. .. maybe breaking one big texture into smaller ones and only uploading the ones which changed (dirty rects algorithm). Or maybe have lots of rectangle sprites and just remove some to create holes?
I have tried the SetPixels32() method and it's working out great. I'm a total shader newbie so I guess I'll go the texture way. Hopefully it won't cause a performance hit. Thank you both for your help, you have saved me a lot of time !