Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Camera.RenderToCubemap draws nothing on iOS

Discussion in 'General Graphics' started by fullike, Jan 31, 2015.

  1. fullike

    fullike

    Joined:
    Nov 13, 2012
    Posts:
    17
    Hi all

    I want to implement realtime reflection on iOS. I use Camera.RenderToCubemap to draw the scene into a cube render texture and everything works fine in editor. But when I upload the project to iOS device, the reflection disappears and the scene is a little blue, looks like the clear color. The call returns true and my device is iPad Air.

    I have tried to use static cube map, it was fine. So the shaders are ok, is there anyone succeed using Camera.RenderToCubemap on iOS? Is that a bug? I'm using 4.5.4 pro
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    The documentation says followring intersting thing
    You may have a debug log tell you if it works on your device or not.

     
  3. fullike

    fullike

    Joined:
    Nov 13, 2012
    Posts:
    17
    iPad Air supports it, the problem looks like something about shader initialization. Actually, I call Camera.RenderToCubemap only once at the very beginning. If I do this after the first frame, the scene can be drawn perfectly.