Painting holes with shader v2.0

mHolePainter v2.0 (just a test/concept demo..)

Using a shader from we can make “holes” in the material using texture. Then just add drawing into that “hole” texture and we have a hole-painter!
Added to this version is:
– You can fill the holes by holding left shift, while painting
– You can shoot objects thru the wall, if there is hole, by pressing space.
– Little sparks fx for the painter

*Note: holes are not actually _painted_ on shader, shader displays the hole where texture alpha is transparent..



2 Comments + Add Comment

  • This is great! How do you make the brush size smaller? I tried replacing the plane
    with a mesh that has more vertices and increasing the resolution of the texture but
    it did not work. Thx for your help!


  • Hi, I’m trying to make an erasable texture and the included shader and mHolePainter2.js script have been very useful. However, I’m having difficulty translating the functionality over to C#. I’m not familiar with JavaScript, and I’m still trying to wrap my head around how to use Unity’s Texture2D.SetPixel function. Could you possibly tell me how to convert your script into C#? Thanks very much! It would be tremendously helpful.

Leave a comment


Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.