Search Unity

Question Shader Graph error SAMPLE_TEXTURE2D_LOD cannot map expression to vs_5_0 instruction set (o

Discussion in 'Shader Graph' started by studentutu, Aug 20, 2019.

  1. studentutu

    studentutu

    Joined:
    Oct 22, 2017
    Posts:
    121
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    You can’t. GLES 2.0 devices cannot read from textures in the vertex shader, and do not have a function to sample a specific mip level even in the fragment shader.

    Basically if you want to have vertex displacement on a GLES 2 device, you need to manipulate the vertices using a C# script.

    Unfortunately Shader Graph also doesn’t have any options for fallbacks or using different nodes based on different platforms so if you want to support those old devices your project cannot use that shader.
     
  3. studentutu

    studentutu

    Joined:
    Oct 22, 2017
    Posts:
    121
    Could you give an example on how to tile the color from the procedural shape? How to tile and offset the procedural shape - rectangle?