Search Unity

Bug Render Texture not working iOS

Discussion in 'General Graphics' started by joshuacwilde, Jan 28, 2021.

  1. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    I am creating 3 render textures. They all work fine in the editor. On iOS, only one of them is "created". Technically they are all created, and I have the logs to prove so, but they are not actually created as render textures, only as C# objects. They don't show up when I use a shader to show them (it just shows black), and they don't show up in Xcode GPU Frame Capture. It appears to be a unity bug, unless I just don't understand something about render textures... But it works in the editor...
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Are they formats that your iOS device supports?
     
  3. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    Rookie mistake on my part. I am rendering shadowmaps. There was a bug where it wasn't getting rendered into on the device, and I had forgotten that not rendering into a rendertexture means it won't get created on the GPU side. Interestingly, RenderTexture.Create() didn't solve the problem with it not being created on the GPU.
     
    bgolus likes this.