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. Dismiss Notice

Is there an equivalent to the UE4 deferred decal workflow in Unity?

Discussion in 'Universal Render Pipeline' started by Minhtyfresh, Feb 2, 2022.

  1. Minhtyfresh

    Minhtyfresh

    Joined:
    Jan 24, 2022
    Posts:
    4
    Hello,

    I'm new to unity and I'm trying to figure out a workflow I used in UE4 for unity, and see if it's compatible in HDRP or URP?

    Specifically, the technique outlined in this polycount thread:

    https://polycount.com/discussion/175191/technique-showcase-unreal-4-13-mesh-normal-map-decals

    Where the decal sheet is a normal map only shader, and the deferred decal geometry inherits the shader from the object it's being projected onto. I've dug around and the closest i've gotten was a standard lit shader set to transparent and multiply, but it doesn't quite have the exact same effect of inheriting the shader of the object below.

    Thanks!
     
    AydinDeveloper likes this.
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Sounds like using just normal maps in the decal systems built into URP and HDRP. Both support just having normal maps and nothing else...
     
  3. Minhtyfresh

    Minhtyfresh

    Joined:
    Jan 24, 2022
    Posts:
    4
    I tried using the shader graph/decal, but it doesn't seem to have an alpha channel slot. just the blend alpha as a slider, but no map control.
     
  4. Minhtyfresh

    Minhtyfresh

    Joined:
    Jan 24, 2022
    Posts:
    4
    Update. the standard decal does work in HDRP. since there's an alpha map channel. But the Decal in URP does not work.
     
  5. Jonas-Mortensen

    Jonas-Mortensen

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    98
    Hey @Minhtyfresh
    More often than not you want to create your own shaders to use with the URP decal system. This can be done with shadergraph. That would allow you to create a decal shader that only affects normal and you can supply the alpha in any way you want, e.g. as an additional texture read
     
    hippocoder likes this.
  6. bnmguy

    bnmguy

    Joined:
    Oct 31, 2020
    Posts:
    125
    Yep. This is the new trend in Unity. You do everything yourself. Seems backwards, but it is how they are moving forward with many things. Shame.
     
  7. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,511
    jajajaja i know is a little frustrating, you have to learn now how to make your own shaders (for some specific purpose) and you have to learn all those nodes and all that, but no one is saying that making games is easy, also shadergraph is a great advantage for devs
     
    Shaderic likes this.
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    No. Shadergraph is no different to having more bloated options on the component / material instead of you choosing to add them. Except shadergraph is much cleaner and a sensible idea.

    I don't know any game engines of any worth anywhere that don't have shader graphs. It's a normal part of game dev.

    It would actually become impossible to fit everyone's needs for graphics on a single material, wouldn't it? Have a think about it for a bit.
     
    impheris likes this.
  9. AydinDeveloper

    AydinDeveloper

    Joined:
    Sep 8, 2017
    Posts:
    89
    If you use Dbuffer mode in URP. You can do mesh decal (HDRP already uses DBuffer technique). You don't necessarily need to use the decal component.
     
    rz_0lento and hippocoder like this.
  10. bnmguy

    bnmguy

    Joined:
    Oct 31, 2020
    Posts:
    125
    I'm more referring to the lack of support for all the URP Uber-Shaders in Shader Graph itself. There is no support for "Simple Lit", or "Baked Lit", for starters. Adding them yourself is a complete nightmare. URP is used a ton for Mobile, and Simple Lit is the most common path for lighting on Mobile. It boggles my mind that this isn't available.
    And no, it's not so simple to do your own lighting, especially when you have objects directly using the Simple Lit shader themselves, and need a Shader Graph shader that gives consistent results.

    Yes, Shader Graph is nice... if you use unlit or just lit shaders. Otherwise, the lighting ends up inconsistent. Seems like a pretty basic thing that, again, is a step backwards.

    Side-note: URP is still not par with the built-in pipeline. Some missing features, we are told, we have to implement ourselves. This is not the right direction. The functionality AND ease of use should be at least on par, IMO.
     
    ivank likes this.
  11. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,511
    Mmm i don´t believe the main reason of URP is being at par with built-in (sorry for my english there) but i also think that "Universal Render" is a bad name for that pipeline, LWRP was more acurate. Remember, the "main" reason for URP is to make games mostly for mobiles or mid-(high?) graphics but nothing too great.