Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Shader graph error

Discussion in 'Shaders' started by Zaskar7777, Jan 22, 2022.

  1. Zaskar7777

    Zaskar7777

    Joined:
    Oct 17, 2020
    Posts:
    36
    What does this error mean and where and how can I fix?

    Code (CSharp):
    1. Shader error in 'Shader Graphs/SceneNodeSurface': 'UVRegionTransform_float': cannot implicitly convert from 'sampler2D' to 'Texture2D<float4>' at line 4002 (on gles)
    2.  
    3. Compiling Vertex program
    4. Platform defines: SHADER_API_MOBILE UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3
    5. Disabled keywords: INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING

    I am using ArcGIS with Unity to export to Android. Unity version is 2020.3.2. I have made sure Vulkan is removed and Auto graphics api enabled.

    Initially, I thought it could be because I enabled fog in the environment setting.s I did remove fog but still getting the error.
     
  2. Zaskar7777

    Zaskar7777

    Joined:
    Oct 17, 2020
    Posts:
    36
    This is a roadblock for me, can someone provide some directions.
     
  3. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,495
    This appears to be an issue with a Custom Function Node in their ShaderGraph file called "SceneNodeSurface".
    ShaderGraph recently made an explicit distinction between texture types in ShaderGraph, so now if you want to reference a raw texture in a custom function node, you want to use "Bare Texture 2D" instead of the existing "Texture 2D" that would have been set before.

    So open up that ShaderGraph file, find whatever Custom Function Node has the UVRegionTransform code in it, and edit the Inputs in your Graph Inspector so that Texture 2D is instead Bare Texture 2D.
     
  4. Zaskar7777

    Zaskar7777

    Joined:
    Oct 17, 2020
    Posts:
    36
    Thank you for a detailed answer. I am trying it out and will confirm once done.