Search Unity

Resolved How can I fix "cannot map expression to vs_5_0 instruction set"

Discussion in 'Shader Graph' started by vectorized-runner, Jun 24, 2020.

  1. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    398
    I'm trying to implement a skinning shader in shadergraph, using HDRP Lit Graph. As I understand from this thread https://forum.unity.com/threads/sha...xpression-to-vs_5_0-instruction-set-o.731021/ its because
    Indeed I am using SAMPLE_TEXTURE2D in my custom function.

    Is there any way I can make this shader compile? I don't care about GLES so perhaps I can exclude it? The original shader had
    Code (CSharp):
    1. #pragma exclude_renderers gles
    Thanks for your help.
     
  2. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    398
    I used SAMPLE_TEXTURE2D_LOD with 4th parameter as zero, I guess it does it for me