I am trying to build a DOTS solution with portals. It falls into the following limitations:
- No portal is rendered twice (there’s no recursion)
- Each portal belongs to an area, that is accessible only via one path (no loop connections via portals)
- There’s a lot of areas (with simple geometry), connected via portals
My current approach is using a render texture and a material per portal, and a single portal camera, that I disable, move to the corresponding location and assign it some portal’s render texture. Then I call Render on that camera. I use Hybrid Renderer in this project, but not sure how to properly utilize it (or if I even need a custom renderer). Also, I have the feeling that my recursive system, that moves camera, assigns different render textures and calls Render method is something wrong in terms of how DOTS and Hybrid Renderer suppose to work. On the other hand, camera is still a managed component. I wonder if there’s a way to optimize this workflow, since even small recursion count with almost no geometry causes quite noticable FPS drop, and the thing that causes it — is each camera.Render() call