untiy2019.3
创建3张render texture
left和right Dimension 为cube
生成结果得 render texture Dimension 为2D
public class Demo : MonoBehaviour {public RenderTexture cubemapLeftEye;public RenderTexture cubemapRightEye;public RenderTexture equirect;public Camera _Camera;void Start(){}void Update(){if (Input.GetKeyUp(KeyCode.A)) {Debug.Log("--------->Create");Create();}}void Create() {_Camera.stereoSeparation = 0.064f; // Eye separation (IPD) of 64mm._Camera.RenderToCubemap(cubemapLeftEye, 63, Camera.MonoOrStereoscopicEye.Left);_Camera.RenderToCubemap(cubemapRightEye, 63, Camera.MonoOrStereoscopicEye.Right);cubemapLeftEye.ConvertToEquirect(equirect, Camera.MonoOrStereoscopicEye.Left);cubemapRightEye.ConvertToEquirect(equirect, Camera.MonoOrStereoscopicEye.Right);}}
生产的结果截图