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.

Question VFX Graph's shader error: redefinition of 'PackHeightmap'

Discussion in 'Visual Effect Graph' started by FVS, Jun 8, 2021.

  1. FVS

    FVS

    Joined:
    Aug 10, 2015
    Posts:
    48
    I've created an empty 2D project in Unity 2021.1.10f1, imported VFX Graph v11, and as soon as I created a New VFX, the error showed in the console:
    and the VFX didn't render at all. Again, complete new project, no URP or HDRP or anything.
     
  2. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    102
    Hey! Thanks for the heads up, but VFX Graph is not supported with Built-in pipeline. If you want to use 2D and VFX Graph together you can do it by using URP + 2D Renderer.
     
    FVS likes this.
  3. miloszecket

    miloszecket

    Joined:
    Feb 4, 2019
    Posts:
    7
    I'm getting a similar error with the Lightweight RP. Is that the same issue?
     
  4. miloszecket

    miloszecket

    Joined:
    Feb 4, 2019
    Posts:
    7
    In fact even using URP it still shows up. what's up with that?
    full error:

    Code (Boo):
    1. Shader error in 'Hidden/VFX/plot points/System (1)/Output Particle Quad': redefinition of 'PackHeightmap' at /unity/projects/QIVR/VomitCoasterFlow/Library/PackageCache/com.unity.render-pipelines.core@11.0.0/ShaderLibrary/Common.hlsl(1202) (on d3d11)
    2.  
    3. Compiling Fragment program
    4. Platform defines: SHADER_API_DESKTOP 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
    5. Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA 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
     
  5. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    102
    Good catch, might be an issue on our side. I took a quick look on 2021.2.0b15 URP + VFX, created a new VFX, saved it added several nodes etc. but the error didn't occur. May you tell me how are you able to reproduce this?
     
  6. miloszecket

    miloszecket

    Joined:
    Feb 4, 2019
    Posts:
    7
    unfortunately the visual effect i'm working with can be (poorly) described as a "clusterfuck," so i'm going to have to pare it down and figure that out myself, unless you'd like the file for it, which is here:
     

    Attached Files:

  7. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    102
    Thanks for sharing the vfx. Oddly, everything works fine and console does not spit any errors. Might be worth considering a few options here:
    - I assume you are using 2021.2 stream, updating to the latest version might resolve the issue;
    - Deleting library folder and reopen the project to see if the issue occurs;

    If you are able to reproduce the issue anyway, it would be greatly appreciated if you report a bug for further investigation. Your findings in this thread are more than welcome too, it may help to reproduce the issue ourselves and forward it to the right direction.

    Cheers!
     
  8. eljimor

    eljimor

    Joined:
    Apr 17, 2020
    Posts:
    1
    I have had the same problem, nothing else you create a Visual Effect graph, the message skips, but it only happens if the Unity version is 2020.3.22f1, now I'm testing 2021.2.7f1 and at the moment nothing skips me, by the way in 2020.3 .22f1 if I try to use higher versions of VFX I get a Copy Riht alert, why is this?