Search Unity

Mobile Shader Graph Sphere Gradient Resolution Issue

Discussion in 'Shaders' started by Dihlmann, Mar 23, 2019.

  1. Dihlmann

    Dihlmann

    Joined:
    Jun 6, 2017
    Posts:
    1
    I created a sphere gradient shader in the new shader graph, it is fairly simple and runs as expected on PC. I tried running the project on mobile but the gradient has artifacts and does not look nearly as smooth as on PC.

    First, I know that Shader Graph is in preview (Unity Version 2018.2.18f1) and may not work perfectly on mobile devices. But I'm new to game development and maybe I'm missing something else. What I have tried so far, with no success:

    - Apply shader material to different objects with different size and scale
    - Eliminated all shader (vector broadcasting) warnings
    - Change camera position and distance to objects
    - Change camera orthographic / isometric
     

    Attached Files:

  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    I'm going to guess that your device is using low precision UVs fairly common on Android mobile GPUs. I'm not sure what the solution to this is, especially since Shader Graph doesn't let you set any gles precision hints. However you would likely get the same artifacts in a have written vertex fragment shader doing the same kind of effect.