Search Unity

Android Vignette and Chromatic Aberration not showing

Discussion in 'Shaders' started by TimTro, Sep 4, 2015.

  1. TimTro

    TimTro

    Joined:
    Jun 1, 2015
    Posts:
    20
    I imported the effects asset package and added Vignette and Chromatic Aberration to my main camera. When I play my game in the editor both of those effects show up exactly how I want them. On the other hand when I Build & Run to my Android (Galaxy S5) none of those effects show up and the game plays as if they were never there.

    I've looked up all I can and everything I found says that it should work fine - even the unity documentation says there shouldn't be a problem unless I'm interpreting it wrong.
    http://docs.unity3d.com/Manual/script-VignettingAndChromaticAberration.html
    "This effect should run on all hardware that Unity supports."

    I've looked at the code for the shader and the script but nothing looks out of place. Any help would be greatly appreciated!
     
  2. TimTro

    TimTro

    Joined:
    Jun 1, 2015
    Posts:
    20
    Hey everyone, I'm still having trouble with this. I'm attaching a picture of the effect I'm looking to achieve on mobile platforms. Thanks for the help!
    unityProb.PNG
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    I don't know whether image effects are supported on that device, but I noticed people reported quite a few Android related shader problems (1 2) recently.

    I would create a minimal test project that only contains assets to reproduce this issue, to make sure it isn't related to the project. Test it on various platforms and if it's still not working, submit the test project to Unity
    using the Bug-Reporter.
     
    TimTro likes this.
  4. TimTro

    TimTro

    Joined:
    Jun 1, 2015
    Posts:
    20
    Hi Peter, I noticed other people having issues but it has just been throwing me off that the app doesn't run any slower and doesn't even try to render the effect.

    I created another project with just the effects assets and one object like you said, the effect worked in the editor but again shows no signs of working on android. I'll submit the project to the Bug-Reporter. It's unfortunate this isn't working but thanks for the help! Hopefully they can sort it out soon.
     
  5. Neogene

    Neogene

    Joined:
    Dec 29, 2010
    Posts:
    95
    Last edited: Oct 23, 2015
  6. Neogene

    Neogene

    Joined:
    Dec 29, 2010
    Posts:
    95
    Hi Peter, did you open a bug?
     
    Last edited: Oct 23, 2015
  7. Neogene

    Neogene

    Joined:
    Dec 29, 2010
    Posts:
    95
    Ok seems related to OpenGLES 3 on Android, change from AUTOMATIC in player settings to OpenGLES 2 and effects will work.
     
  8. DmitryNovikov

    DmitryNovikov

    Joined:
    May 2, 2015
    Posts:
    6
    Same issue on Samsung galaxy note 4
    adb logcat said "Const arrays detected, failing compilation", and when "Pass `` has no vertex shader"

    Const array is needed for advanced aberration mode only, so you can delete or comment out 2nd pass in ChromaticAberrationShader.shader:
    Pass { ZTest Always Cull Off ZWrite Off CGPROGRAM #pragma vertex vert #pragma fragment fragComplex ENDCG }
    Works on galaxy note.
     
    Last edited: Oct 23, 2015
  9. Kapuchin-janmajaya

    Kapuchin-janmajaya

    Joined:
    Nov 12, 2014
    Posts:
    7
    Ok seems related to OpenGLES 3 on Android, change from AUTOMATIC in player settings to OpenGLES 2 and effects will work.

    Worked for me. Thanks Neogene