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

Help me ....... undeclared identifier 'conv_mxt4x4_'

Discussion in 'Shaders' started by thanhle, Jan 29, 2022.

  1. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    I have this shader :
    but i got this error

    undeclared identifier 'conv_mxt4x4_'
    Compiling Vertex program
    Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_FORWARDBASE UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_VIRTUAL_TEXTURING


    i try to download UnityCG.cginc and put in folder contain shader but still Error
    Please Help me !

    Thank you
     

    Attached Files:

  2. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,495
    There's just a typo on lines 134, 135 & 136.
    A stray minus sign
    -
    has been inserted for some reason. Its should be
    conv_mxt4x4_2
    not
    conv_mxt4x4_-2
    same goes for the other lines I mentioned, remove the
    -
    sign.
     
    thanhle likes this.
  3. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    Thank you !

    Error have been fixed but the shader still not showing inside my scene T_T
    Just show white color
    upload_2022-1-30_16-17-51.png upload_2022-1-30_16-18-5.png

    I am upload add shader in here ... can you help me ?
     

    Attached Files:

  4. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,495
    You shouldn't need to include the UnityCG files in your project, those are already part of the Unity install and may result in issues by you including them this way.

    If the shader still isn't rendering properly after removing those files, then I'm not sure, this seems to be a shader that was generated by something, so the code is far too much of a mess to easily analyze the behaviour.

    Are you using the built-in render pipeline, URP or HDRP? This should only be used with the built-in pipeline.
    I can't spend anymore time than this debugging it for you though.
     
    thanhle likes this.
  5. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    Thank you so much for help free to me !
    I am having a few trouble with this shader, if you can solve it , I am happy to send you money via Paypal to say thank you !
    Please PM me !
     
  6. NotKrv

    NotKrv

    Joined:
    Nov 25, 2022
    Posts:
    1
    Did you ever find a fix for this?
     
  7. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,495
    Read the thread