I made a black hole following this tutorial, and I want to put it behind some glass. However, because of the way the shader uses the facing node from the layer weight (at least I think this is what causes the problem), the black hole disappears when glass is in front of it. How would I fix this? This is in Cycles.
There is some refraction going on that is reducing the clarity of the BH showing through the glass -- in other words I would focus on the glass material, not the BH material.
At first I thought your "test" Material IOR (at 1.45) was too high, but a value of "1.0" (no refraction) didn't do the trick. I tried another Material I use for glass, and that one works.
Because the answers don't cover everything, I wanted to write my own. The reason why the black hole doesn't show through glass is because the "transmission" under ray visibility for the black hole object isn't checked (to make the black hole look better/more realistic), which is the type of ray that the glass BSDF shader uses. To fix this, you can fake a glass shader using transparency, but some don't work that well with different shapes. This is the one I found that is the most versatile.