Search Unity

Help Wanted Have an error "Undeclared identifier samplerTexture2D": LWRP

Discussion in 'Shader Graph' started by U_bot, Sep 8, 2019.

  1. U_bot

    U_bot

    Joined:
    Mar 25, 2016
    Posts:
    2
    I can't get rid of an error "Undeclared identifier samplerTexture2D..." in shaders made with Shader Graph when I build any project for Android.

    undeclared identifier 'samplerTexture2D_A76CF36A'
    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING

    undeclared identifier 'samplerTexture2D_A76CF36A'
    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING

    I still can build for Android but objects, where these shaders are used are not rendered. I have latest version of an editor (2019.2.4f1) and Shader Graph, reinstalled AndroidSDK. I have this problem in different versions of editors in LWRP SampleScene. Please help, I wasted so much time for this.
     

    Attached Files:

  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    96
    This sometimes happens with sampler states in subgraphs. Are you using subgraphs?
     
  3. U_bot

    U_bot

    Joined:
    Mar 25, 2016
    Posts:
    2
    No, I am not using subgraphs.
     

    Attached Files: