I’m not sure how to go about this, but here I have some idea’s
Lets say I have a png image and i want to explode(from zero scale to whatever size) gameobjects at it, which will cut out from the image as the gameobjects are expanding.
-
- I know I have to make the Image read writable.
-
- I’m assuming that the best way to go about this is a modified shader “not sure how to do this”, as I’ve not messed with shader code as of yet.
The gameobjects themselves are not a problem, unless I have to manipulate them in a unique way to react to the image.
Any idea’s or example(s) on this subject would be great.
Cheers
You may be able to avoid read/writing textures by using the Stencil buffer for the cutout object and the objects being cut out.
Basically the object growing will have a shader that sets a number into the stencil buffer for every pixel it covers. Then all other objects that need to get cut will not render if they see that number is in the stencil buffer where they’re trying to render a pixel.
That sounds complicated but it’s easy to configure in the shader.
Check out this example of an implementation of the stencil buffer:
http://nielson.io/2015/12/splatter-effects-in-unity-using-the-stencil-buffer/
Docs:
@LiterallyJeff
Cheers Jeffrey, always a pleasure to get help from you, I’ll take a look at that over the weekend 
1 Like