- Home /
Most efficient way to do Mercator camera projection
I'm working on a project where we are trying to add (set of) cameras that renders a scene using different camera projections like below.
We are currently using SphericalImageCam an asset from the asset store. It accomplishes a Mercator projection using a similar method as the Standard Assets > Image effects assets (e.g fisheye). It overrides OnRenderImage on a script for each camera, then uses a shader to draw that camera, with transformations to a RenderTexture. Then another script draws that RenderTexture to the screen each frame.
It might be possible to get these cameras to render directly to the screen, however removing the RenderTexture from each camera causes each camera be rendered twice (once filling the screen, then once in their transformed shape on top of that) and stupidly right on top of each other. I can only image that removing the RenderTexture step would greatly help with the real issue:
This method also causes extremely poor framerate on any but the most high-end systems. I am aware that it is using DirectX 11 internally, which might contribute to this. I am wondering if there is a better way to accomplish our goal of different projections in a more efficient manner?
Your answer
Follow this Question
Related Questions
Procedurally generate icon textures 1 Answer
How can I force FPS per camera? 1 Answer
QualitySettings.antiAliasing vs RenderTexture.antiAliasing 0 Answers
Combining render textures 1 Answer