Replacement for projector in URP?

I’m creating a game to play TTRPGs with friends online in VR, and a big part of those types of systems is having a grid overlay on the board. Like this:

This was easy enough to do using a projector previously. But when I switched to URP, projectors no longer work.
Is there a way to accomplish the same effect of a grid overlay in URP?

Thanks

I recently made a water shader for URP. One feature was caustic, so I implemented a custom render pass. It’s projecting a tile able texture onto the complete map. Sure, you could limit it to a specific world height and range. So you would need a custom URP forward render feature. Check out this tutorial:

If you want a decal system, there are some options on Asset Store for URP. Sadly, no built-in support for URP at the moment. :frowning:

you can try this
https://github.com/ColinLeung-NiloCat/UnityURPUnlitScreenSpaceDecalShader

4 Likes

Thank you for sharing this! I’m integrating it into my project!

From 2021.2 URP supports the SRP Decal Projector. You can download the latest prerelease from the Hub to give it a try :slight_smile:

3 Likes

Need Layers, because in the opposite case, they are drawn wherever needed and not needed!

3 Likes

I couldn’t find any exclusionary properties on materials or anything. HDRP allows a material to not be included with decals, and this is often enough for most cases, but I couldn’t work out even how to do that.

Therefore I don’t see the use of the current decal system except for tiny bullet marks.

Hopefully someone will be along to correct us.

2 Likes

this is so stupid , I have no idea why there’s no native support for real time projection in URP

1 Like

Layer support is planned for the URP decal projector. I’ll make sure to update this thread when I know more!

5 Likes

Cheers it’s a bit (totally) limited at the moment in a real game with characters picking up all sorts. To address it, a render order feature was needed which brought other problems with it :slight_smile:

1 Like

Some news information on the layers filters for Decal Projector ? :slight_smile:

1 Like

Nope sadly no. Only thing I can say for certain is that it won’t be supported in 2021.2

@mitchscobee With layers not being supported in the first release of the decal projector, maybe this workaround could be an option for you;
You could isolate decals to the floor by having the floor be rendered by an overlay camera that doesn’t clear depth. This overlay camera would use a renderer with the decal renderer feature added, and the base camera would use a renderer without it. This does mean that you can’t put decals on anything other than the floor, so I don’t know if that is a viable solution for you.

@Jonas-Mortensen

i am using Unity 2021.2.b16 and paying around with the new decal projector for URP. On Android it works nicely. Unfortunately it’s not working on WebGL (2.0). Is this a known issue or not supported at al ?

7584328--940189--upload_2021-10-19_13-14-19.png

Joho! A bunch of months later, where are we on that end?

Decal layers landed in URP and is available in the latest 2022.2 alpha

2 Likes

but still it’s bugge on android :#

Hi, have you tried switching to Vulkan for android builds? AFAIK URP Rendering Layers (Decal Layers) don’t support OpenGL backends.

i did , in Vulkan the decal does not show at all , i’m trying to make a fake shadow under the car ,
do you know any way around?

Hi!
Did you solve it? I have the same problem in Androids…Decals works but in some camera angles they desappears. And layers doesnt work in Android.

I have the same idea, fake shadows…