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. Dismiss Notice

RenderTexture not getting bound (Unity 4.6.9)?

Discussion in 'Android' started by madmonstor, Feb 2, 2017.

  1. madmonstor

    madmonstor

    Joined:
    Apr 29, 2015
    Posts:
    15
    Hello Unity Forums,

    We are porting an existing Unity app to iOS/Android using Unity 4.6.9. The application renders dynamic text to a RenderTexture which is then bound to quads in the world for display. Everything works find in editor and on iOS, however, on Android, the quads that should be using the RenderTexture containing the text end up using the previous draw call's bound texture (i.e. RenderTexture is not getting bound). RenderTexture was a Pro feature under 4.x and I've verified that the Android pro license is detected with "#if UNITY_PRO_LICENSE". We were able to confirm that no glBindTexture call occurs prior to the draw call in texture by diagnosing a frame using the Tegra Graphics Debugger. Any idea what could be causing the issue? (renderer is ES 3.0).

    Many thanks!
     
  2. madmonstor

    madmonstor

    Joined:
    Apr 29, 2015
    Posts:
    15
    Hello Unity Forums,

    We've updated to Unity 4.7.2 (highest we can go for the scope of this project). We are still observing the issue of the RenderTexture not getting bound to the material when rendered in the 3D scene. Based on navigating the textures in an OpenGL frame capture in Snapdragon profiler, it does appear that the render textures themselves are getting created and properly populated with dynamic text. Any idea what could be causing the material texture binding to be ignored on Android?

    Thanks!
     
  3. madmonstor

    madmonstor

    Joined:
    Apr 29, 2015
    Posts:
    15
    When downgrading the renderer from Force GLES 3.0 to Force GLES 2.0, the behaviour changes slightly. Texture 0 gets bound in place of the RenderTexture resulting in black texturing rather than using the previously activated texture. However, it still does not resolve the issue. The seems to be too flagrant for it to be an oversight. I'm thinking that perhaps something with licensing isn't triggering properly or making it to the runtime? Can anyone confirm if RenderTextures have worked on Android on these versions of Unity?

    Thanks!