Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tutorial - Decals in URP & HDRP

Discussion in 'Community Learning & Teaching' started by ChrisKurhan, May 31, 2022.

  1. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    266


    Hey all! Happy #TutorialTuesday!

    Many of us who aren't super comfortable writing our own shaders relied on 3rd party tools for decal projections or went with simple quads for decals. As of Unity 2021, URP now has a Decal Projector much like HDRP has had for a while. It's not perfect, but it's a big improvement over the quad-based decal systems I've implemented before. I'm hopeful the URP one continues to get improvements as new releases come out.

    In this tutorial I'll show how to enable decals in URP, review all the configuration options in the render asset and what they do, and go over what all the decal projector options do. We'll do the same again for HDRP so you have an informed starting point for adding decals into your game regardless if you're using URP or HDRP.

    Unfortunately the Built-in render pipeline still doesn't support them without custom shaders, so you'll have to write your own or use a 3rd party solution to get a similar result over there.

    If you got value from this video, please consider liking, subscribing, and sharing to help these tutorials reach and add value to even more people. New tutorials are posted every Tuesday!
     
    jpviegas and Novack like this.
  2. jpviegas

    jpviegas

    Joined:
    Jan 12, 2018
    Posts:
    2
    Hi, I've seen your video it was really well explained. But it skipped over the only bit I am struggling with...
    I created an HDRP decal shader graph and have it configured to the specifications of the unity material but the decal projector does not accept it. I'm looking everywhere to get help on this topic but I can't find it

    The manual says to drag the HDRP shader graph here but it's greyed out, Any ideas?
     

    Attached Files:

  3. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    266
    From your screenshot it looks like you are using a default material that is included by Unity that is not editable. If you create a new material using that shader, does that work? Or am I misunderstanding your question?