>>319787108
I made the shader for the egg. It's a relatively straightforward stencil buffer setup, with the inside of the egg setting the stencil buffer, and the orrery geometry testing the stencil buffer, on a higher render queue, with an otherwise regular mesh renderer. i.e. the standard 'portal' effect.

The less straightforward part was to get the orrery to fit inside vket's booth bounds check. I hacked around that by shrinking the gameobject transform enough so that the skinned mesh bounds fit intothe booth, then in the vertex shader, rescaling the vertices back to full size in model space before applying the MVP transform. In retrospect, since it's a skinned mesh renderer, you can probably just edit the bounds in unity manually; i made the hack when it was still a regular mesh renderer though.

Finally, the orrery is still "real" geometry and needs depth checks to render properly, yet the depth buffer is already set by the surface of the egg. To fix this, I scaled the vertex's Z in clip space back from the real (hundreds of meters away) to 0-1 meters (i.e. inside the egg). This essentially squishes the geometry inside the egg while remaining correctly (stereo) projected. I did have some weird trouble with the clip space Z I don't entirely understand still; that's why when you go inside the egg, the orrery can render on top of your own avatar's shaders (since it's "closer" on the z buffer"). Something about the reversed-Z buffer that I don't understand entirely.

https://github.com/Xiexe/Unity-Lit-Shader-Templates is an excellent template for making standard-lit shaders but customizable (e.g. the vertex shader hacks). I got all the stencil/blend operations into the material inspector by copying this template https://gitlab.com/s-ilent/neo-panosphere/-/blob/master/Assets/Shaders/NeoPanosphere/NeoPanosphere.shader#L28-67 ; https://github.com/supyrb/ConfigurableShaders is also a good reference, though it doesn't break it out as finely.