DISCLAIMER: I'm using Unity, but I just need the theory here, really. As a warning on the Unity player, there's no invisible walls, so please don't fly off the edge of the world.
I've been trying to use precomputed stencil volumes like spheres, boxes, and cylinders to render holes in meshes, but I'm having a bit of trouble. The big problem is that I've actually never coded stencil shaders before and usually use visual shader tools like the UE4/UDK material editor and Shader Forge, but those aren't an option for this project.
I'd like to accomplish something like in the Unity player there where I'm cutting a spherical (or other geometric) volume out of the level geometry. It seems to me that I should be able to use something like Carmack's reverse for this and just have it so that instead of calculating the shadowed areas, I'm calculating an alpha clip on the intersected geometry. Because I'm on Unity Free, I don't have access to things like render textures, but I do have access to the stencil buffer, which should make this theoretically possible.
I think.
...help