I would like to achieve a similar effect than the one done in “Unrailed!”, see video at given timestamp:
The idea is to divide the space in a cylinder from the space around it.
To render something in that cylinder and something else outside and to shrink it/expand it dynamically.
I asked “Unrailed!” dev team, but they don’t use Unity so we didn’t go into details…
I didn’t find a way to achieve that in Unity yet. Any idea?
I’ve just read one of your posts in another thread:
I was wondering why it was so hardcore to start writing lit shaders with my HDRP project…
So I guess since I’m expected to use shader graphs, this is going to be impossible to implement. Right?
Nah, pretty simple to do in shader graph. This is one of the kind of things Shader Graph excels at.
Position Vector3 property, radius Vector1 property (or a single Vector4 for both). A position node set to world. A sphere mask node. Plug the world position, position property, and radius into the sphere mask, and direct the output into the master alpha. Then use a Vector1 to set the Alpha Threshold to 0.5 and you’re done.
To flip what part of the circle gets hidden, use a one minus node on the sphere mask output. You can use a bool property and a branch to select between the two versions.