Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cant see ui in rendertexture created by ConvertToEquirect()

Discussion in 'UGUI & TextMesh Pro' started by ArtoriasLX, May 30, 2019.

  1. ArtoriasLX

    ArtoriasLX

    Joined:
    Sep 4, 2018
    Posts:
    1
    Here's my code
    Code (CSharp):
    1.        
    2.         RenderTextureDescriptor rtd = new RenderTextureDescriptor(1536, 1024, RenderTextureFormat.ARGB32, 24);
    3.         RenderTextureDescriptor cubeRTD = new RenderTextureDescriptor(512, 512, RenderTextureFormat.ARGB32, 24);
    4.         cubemapRT = new RenderTexture(cubeRTD);
    5.         cubemapRT.dimension = TextureDimension.Cube;
    6.         cubemapRT.isPowerOfTwo = true;
    7.         mainCamera.RenderToCubemap(cubemapRT, 63);
    8.         equirectRT = new RenderTexture(rtd);
    9.         cubemapRT.ConvertToEquirect(equirectRT);
    10.  
    upload_2019-5-30_18-15-26.png



    and this is the rt i get by ConvertToEquirect()
    upload_2019-5-30_18-16-0.png