A mesh-based PBR decal system for Unity's universal render pipeline.
A mesh-based PBR decal system for Unity. For use with the Universal Render Pipeline's forward renderer.
There are broadly two approaches to rendering projected decals in real-time graphics:
Each approach has its strengths and many projects benefit from using both for different situations. For example Half-Life: Alyx appears to use projected mesh decals for some static scenery details, and view-space projected decals for dynamic effects like bullet holes. I've written a little interactive article about how decals can be rendered if you would like to know more.
This decal system only deals with creating projected meshes, so you shouldn't expect it to be a complete solution to every decal use case.
Hello! This package isn't kidding about having a "preview" version number. You are of course welcome to use it as you like, but please be aware there are known missing features and almost certainly bugs.
I am still working on this and intend to bring it up to release quality. At the moment I'm busy working full-time on projects away from Unity, so progress is not fast. Pull requests are always welcome if you're feeling inspired!
In theory it should work in the LWRP and Unity versions as far back as 2018. But it looks like shader graph really doesn't care about cross-version compatibility. If you need this to work in those earlier versions I may be able to put together something compatible with some extra work.
https://github.com/Anatta336/driven-decals.git
and click "Add"Or you can manually modify your project's manifest.json
file in the Packages folder to include:
{
"dependencies": {
"com.samdriver.driven-decals": "https://github.com/Anatta336/driven-decals.git",
...
},
}
Extensive documentation including step-by-step instructions to get you started.
Sam Driver - Website, Twitter, PayPal (any support is very gratefully received)
Kenny5 - Made everything work nicely with the Unity Package Manager.
The source code of this project and associated documentation is licensed under the MIT licence.
The included example assets are licensed under the Attribution 4.0 International (CC BY 4.0) licence.
These licences mean you already have permission to use this in whatever project you like, including commercial releases. They place no obligation on you to release your source code. If you release something that makes use of this decal system a small acknowledgement in the credits would be appreciated, but is not required.