URP Decal feature not working under Linux

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.

1 Like

Does the problem also occurs if you create the fresh project on Linux?

Yeah it does, I’m pretty certain at this point that whatever is causing the issue isn’t the project

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.

6 Likes

Thank you for providing your solution. i have the same problem and I’ve already tried other solutions without success. I’m also running unity in linux so i feel like this could work.
please, I’m quite new to unity, can you explain how to do both of these things?

You want to go to: Projects Settings > Player > Other Settings, and disable “Auto Graphics API for Linux” (see here).
This should bring up a box which allows you to select the graphics APIs used by the game on Linux. Removing OpenGL, or lowering it in priority should fix the issue.

I believe that the screen-space technique for decals is less performant (I’m not an expert though), which is why I personally prefer to take the approach of removing OpenGL. However, if you require OpenGL for other reasons, you could swap to using screen-space decals instead.

To switch to screen-space decals, you first want to find your renderer (see here) and then the decal renderer feature (which should be added to it). On the feature there is a dropdown called ‘Technique’, which can be set to ‘Screen Space’ (see here).

Hope this helps!

2 Likes

thanks you very much for your response.
Turns out my renderer didn’t have decals added but anyway after adding it, i had the same issue, which was related to OpenGL, switching to Vulkan solved the problem.
Just as a note, in HDRP the selected driver by default in Linux is Vulkan so decals work ‘out of the box’.

1 Like

I have had the exact same issue on MX Linux and Unity 6.000.0.41f1 (LTS).

Switching the editor to Vulkan fixed the issue.

I second making this the default.