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

Resolved URP Decal feature not working under Linux

Discussion in 'Linux' started by jacobpoulton, Apr 4, 2024.

  1. jacobpoulton

    jacobpoulton

    Joined:
    Apr 3, 2018
    Posts:
    3
    Hi,

    I am encountering an issue where Unity is not recognising that I have added the decal render feature, and as such the URP Decal Projector won't work, stating "The current renderer has no Decal Render Feature added".

    I've tried looking around to see if anyone else has had this issue, and the only instance I've seen is linked here, however no solution was found, and the post has been untouched since September.

    I am on Ubuntu 22.04, and the other discussion I linked was with Pop OS.


    Steps to reproduce:
    Using Windows I created a fresh project using the 3D URP template, added a URP Decal Projector, and then added the decal renderer feature. This results in decals working correctly.

    However the moment I transfer said project to Linux, Unity no longer thinks the renderer feature is present, and the warning returns, as well as the decal no longer being visible.

    The same results occur if I create the project under Linux.


    Editor Versions:
    I've tried this on several different Unity versions:
    • 2023 (I forget the specific version)
    • 2022.3.23f1 LTS
    • 2022.3.9f1 LTS
    • 2022.3.3f1 LTS
    None of these made any difference to the problem. I tried creating a new project fresh for the editor each time, as well as opening the version I made under Windows which was confirmed to be correct.


    I've tried removing and reinstalling Unity from my system by removing the unityhub package, as well as deleting the following directories:
    • ~/Unity
    • ~/.local/share/unity3d
    • ~/.config/unity3d
    • ~/.config/unityhub
    • ~/.config/Unity
    This did not fix anything. However, I am unsure if there were more directories I could have deleted (I could not find more). If anyone is aware of a better way to perform a clean reinstall, that could be helpful.


    I'm unsure what else I can try at this point. Any advice would be much appreciated.
     
  2. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    144
    Does the problem also occurs if you create the fresh project on Linux?
     
  3. jacobpoulton

    jacobpoulton

    Joined:
    Apr 3, 2018
    Posts:
    3
    Yeah it does, I'm pretty certain at this point that whatever is causing the issue isn't the project
     
  4. jacobpoulton

    jacobpoulton

    Joined:
    Apr 3, 2018
    Posts:
    3
    After looking into this a lot more, I've found the cause of the problem.

    The Decal Renderer Feature defaults to using the 'Automatic' technique, which selects appropriate techniques based upon build platform. On Linux this seems to be using the DBuffer.

    Meanwhile, Unity also seems to default to using OpenGL on Linux (at least for me) as the graphics API, which is incompatible with the D-Buffer technique.

    The problem can be solved by either:
    • Removing OpenGL from the project.
    • Switching the Decal Renderer Feature's technique to 'Screen Space'.

    Hopefully this is helpful for anyone else with this problem.

    I feel like this problem could be more easily avoided if Unity didn't state "The current renderer has no Decal Render Feature added" which is very misleading to the problem at hand.
     
    ChiwTheNeko likes this.