Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Is there a way to decal without URP or HDRP?

Discussion in 'General Graphics' started by shum88, Mar 11, 2023.

  1. shum88

    shum88

    Joined:
    Dec 16, 2022
    Posts:
    23
    I can't find any tutorial or information to do decals without URP or HDRP. Can anyone point out where I can find the information? I want to put a poster on the curved wall.
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,184
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,255
    There's no official equivalent to URP and HDRP decals for the built in rendering path. Projectors were a feature that is kind of similar, but has a ton of limitations. Like it's much slower than more modern decals, and doesn't support receiving lighting. They're always unlit. That's not really solvable even with a custom shader. And you will need a custom shader because Unity doesn't even include any shaders that work with projectors anymore.

    If you want decals for the built in rendering path, there are some tutorials out there that show roughly how to make your own (including an example package from Unity themselves), and there are some assets on the store. Some only work with Unity's Deferred rendering path though.

    If you're wondering what people used to do to achieve this in the past (and actually still do, as it's how they do them for Doom: Eternal and Star Citizen) is you just build custom geometry that sits just above the wall surface with a poster material. If you want it on another different shaped wall, you make custom geometry for that too. Seems insane when it would seem like using decals is much more efficient, and it is from a content creation stand point, but custom geometry renders much, much faster.
     
  4. Sluggy

    Sluggy

    Joined:
    Nov 27, 2012
    Posts:
    845
    To go along with what bgolus said, I know of at least one asset that generates that custom geometry on the fly. Obviously not something you'd want to use heavily at runtime but still very good if you just need to generate lots at edit time or on level load or perhaps a one-and-done situation at runtime.
     
  5. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,380
    To put a poster on the wall, just create a quad and put it real close to the wall. If you're not doing anything dynamic then using projectors or decals seems like overkill.
     
  6. Banaaani

    Banaaani

    Joined:
    Feb 10, 2021
    Posts:
    2
    This is not really an option for many cases. Forexample if you need to create it close to an edge or to bodies, it's super obvious that it is just an 2D image.
     
  7. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    560
    Sluggy likes this.