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

Render CommandBuffers not working on Android ?

Discussion in 'General Graphics' started by ciprian_facerig, Dec 15, 2016.

  1. ciprian_facerig

    ciprian_facerig

    Joined:
    Mar 25, 2015
    Posts:
    34
    We modified the provided command buffer sample to downscale a render target down to 1x1, save it to a RenderTexture, and then apply this RenderTexture to the wall. The biggest modification we made is creating a RenderTargetidentifier out of a RenderTexture and blitting to that at the end instead of using a global sampler variable, and then putting that RenderTexture on the target object's material.

    It all works well in the editor but when building and running for Android the wall is black, as if the command buffers don't even work on Android.

    On our real project where we do this 5 times, the project flat out crashes...
     
  2. andrewgotow

    andrewgotow

    Joined:
    Dec 28, 2013
    Posts:
    18
    Which CommandBuffer sample are you using? It's a bit difficult to help debug without more information about what specifically is happening.

    Are there any runtime exceptions thrown when the build crashes? It could be that you are attempting to blit to a non-existent render-target, or one that has been released and are not handling the thrown exception.
     
  3. ciprian_facerig

    ciprian_facerig

    Joined:
    Mar 25, 2015
    Posts:
    34
    After some more debugging it seems the blackness was from a shader we didn't add to "always included shaders". We fixed that and now the test project works on a Nexus 6 and crashes on a Galaxy S6.
     
    danidina330 likes this.
  4. ciprian_facerig

    ciprian_facerig

    Joined:
    Mar 25, 2015
    Posts:
    34
    The crash seems to be from adding OpenGLES3 to the list of Graphics APIs.
     
  5. GreatWall

    GreatWall

    Joined:
    Aug 7, 2014
    Posts:
    57
    Hi I have the same problem.Could you please give me a detail how to solve it. Because I include the shader ,but the result is still black.