- Home /
How to create a hole using a shader?
I'm trying to create a hole effect as shown in the attached image, but I can't for the life of me figure it out.
black area = hole
white line = crease inside the hole (so it looks like a bottomless hole going down) grey area
grey area = surface around hole
I've tried pursuing a few options, but I get stuck or it doesn't seem to lead me to the solution. I'm not expecting a reply with a source code, just clues into how I can achieve the effect. Driving me nuts
I think more context is required. Are you sure a shader is the best solution to this?
Why not just make a hole in the mesh? Or you could try using an alpha texture with another object behind it to create the illusion?
It depends how on how important the effect is, size of hole, how many holes, etc..
As $$anonymous$$ said, why not use gameobjects to create the hole? If you want it so you cant enter it just place an object with no renderer above it.