Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Compute shaders not working in Linux w. OpenGL and nVidia cards?

Discussion in 'Linux' started by jpileborg, Jan 22, 2023.

  1. jpileborg

    jpileborg

    Joined:
    Jan 5, 2013
    Posts:
    36
    I have been trying out a couple of modern terrain generators (Gaia Pro and Procedural Terrain Generator - Vista).

    Neither of them work in the Linux editor. Different behavior but both related to compute shaders.

    Gaia Pro get stuck in a step that should be very short ("Calculating heights"), while Vista can't blend multiple biomes into the terrain.

    It all works very well in Windows, even in a Virtual Box VM, which I currently use as a very cumbersome work-around.

    I've tried both in different 2021 and 2022 releases of Unity.

    Is this a known problem? Where can I read more about it? And does there exist a fix or better workaround than working in a Windows VM?

    I'm planning a rather large open-world game (who isn't? ;)) with multiple different biomes, but it's kind of hard if it doesn't work in my native development environment.

    I'm on a pretty high-end system with an RTX-4080 card.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,192
    Try to get a small repro case and make a bug report (bigger projects could be used as well, but might be hard to confirm the issue).
    And seeing the title, vulkan does work?
     
  3. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    150
    No problem getting compute shaders to work on Linux here. But I have an AMD card and I use Vulkan.
     
  4. jpileborg

    jpileborg

    Joined:
    Jan 5, 2013
    Posts:
    36
    For nVidia cards, Vulkan in the editor have been broken for some time now so I haven't been able to test with that.

    I've sent an in-editor "Help / Report a bug" which includes my test project. I just wanted to know if this was something that was known, and if there existed a workaround that doesn't involve a Windows VM or buying a new graphics card. :)
     
    Last edited: Jan 22, 2023
    tylerinthezoo and DevDunk like this.
  5. jpileborg

    jpileborg

    Joined:
    Jan 5, 2013
    Posts:
    36
    As a usable workaround for my current use-case (using Gaia to create terrains) I can use the old "stamper" method instead of the more modern procedural generation.
     
  6. jpileborg

    jpileborg

    Joined:
    Jan 5, 2013
    Posts:
    36
    The reply from Unity is that it supposedly work in Ubuntu 20.04, which is the latest version officially supported.

    Using it is no solution for me, since I won't downgrade. I also can't get Unity to work in a Docker container (I came close but the editor just won't start). And it's not possible to run in a VM. So it seems modern terrain tools just won't work for newer releases of Ubuntu for a while.

    That's a shame because I just today learned about MicroVerse, from the author of MicroSplat, and it seems even more interesting than both Gaia and Vista. But alas, it uses compute shaders for its stamping and just doesn't work for me.
     
  7. jpileborg

    jpileborg

    Joined:
    Jan 5, 2013
    Posts:
    36
    I managed to get it to work!

    I managed to get Vulkan installed and running directly using the nVidia drivers (no Primus or anything else involved) and it works fine now. I'm using Unity version 2021.3.20f1 (LTS) which doesn't crash when using Vulkan, and it all works fine.

    As an added bonus I can not use and work with HDRP scenes. :)

    Addendum: Works fine with Unity 2022.2 as well.
     
    Last edited: Mar 30, 2023
    DevDunk likes this.
  8. lalamax3d

    lalamax3d

    Joined:
    Aug 23, 2012
    Posts:
    17
    @jpileborg , which linux os/version you are using.
    i am on kubuntu 22 LTS and 2022.2 is not working. all easyroad shaders showing bright pink (missing shader)
     
  9. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    150
    Sounds like a different problem. Are Unity's shaders working properly? Are Easyroad shaders the only having issue? Any error message in the console?
    From what you're describing, assuming the same project works OK on Windows, my first bet would be casefolding issue in shader include path.