Hello, I am trying to make a shader effect where the environment is highlighted based on a sphere mesh. Basically, I have a scene depth texture that is achieved from the center of the sphere perspective and saved onto a cube map.
Example
The cube map is then projected onto the large sphere and it then uses the depth values to morph the sphere inwards, creating the effect that the sphere gets stopped by obstacles and it doesn’t seep over behind them.
sphere morphing material
But what I need the final result to look like is the sphere needs to be invisible and the only thing it leaves behind is the sections of the level that the sphere mesh was able to reach (in direct line of sight of the sphere center). I had originally hoped to use distance fields but from what I have found online they can’t be updated on procedural meshes during runtime so they still end up using the static sphere mesh.
The sphere is affecting the distance fields and the environment is set to false.