Search Unity

5.6.1 & Vulkan Shader Error

Discussion in 'Android' started by DavidSmit, May 12, 2017.

  1. DavidSmit

    DavidSmit

    Joined:
    Apr 1, 2014
    Posts:
    50
    Hi, I just upgraded to 5.6.1, and tried to create an Android build. It has Vulkan support.
    Half way through the build process the following errors occur:

    Error: "Shader error in 'Hidden/Post FX/Screen Space Reflection': '' : compilation terminated at line 141 (on vulkan)"
    Error: "Shader error in 'Hidden/Post FX/Screen Space Reflection': 'z' : vector field selection out of range at line 141 (on vulkan)"

    Very similair to this issue:
    https://issuetracker.unity3d.com/is...after-building-postprocessing-asset-on-vulkan

    Any tips?
     
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I have same problem with Post Processing Stack. Also it doesn't works on ES3.1 device (black screen).
    So i decided to use Amplify Color for color grading and Kino Bloom as bloom effect.

    It seem's Post Processing Stack is not designed for android devices. Some time compile time is very long when building APK.
     
  3. DavidSmit

    DavidSmit

    Joined:
    Apr 1, 2014
    Posts:
    50
    Compile time is (I believe) due to the first time you build it with a new version. After the first time, it should be ok again.
    Post Processing stack with vulkan on android was ok in the last version though, and it also works if you disable Vulkan. But yeah it's the combo with 5.6.1 that is giving issues.
     
  4. superdupergc

    superdupergc

    Joined:
    Jun 21, 2013
    Posts:
    28
    How do you disable Vulkan? I've been trying to figure out a workaround - trying to hack the shader with #if SHADER_API_VULKAN doesn't seem to work
     
  5. biodam

    biodam

    Joined:
    Jul 10, 2013
    Posts:
    17
    I have the same issue. I disabled vulkan by going in " Project Settings -> Player -> Other Settings " and uncheck "Auto Graphics API" a list will appear and remove vulkan from it.

    upload_2017-5-31_15-51-23.png

    upload_2017-5-31_15-56-28.png

    Now I'm searching for antialiasing and bloom for mobile. Will check out the "Kino Bloom" that aliyeredon2 mentioned.
     
    superdupergc and tyoungjr like this.
  6. tyoungjr

    tyoungjr

    Joined:
    Nov 15, 2013
    Posts:
    5
    Thank you this solved my problem.
     
  7. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
  8. Sixbraker

    Sixbraker

    Joined:
    May 20, 2017
    Posts:
    8
    thanks this fixed my issue