Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP Vertex displacement decal

Discussion in 'Graphics Experimental Previews' started by Scribbler_, Aug 24, 2019.

  1. Scribbler_

    Scribbler_

    Joined:
    Aug 7, 2018
    Posts:
    9
    Hello all;

    Is it theoretically possible to alter the vertex positions of a mesh using a decal in HDRP?

    This wouldn’t be possible with a deferred decal (since the vertex positions are already committed to a GBuffer in advance of the decals being applied), but it’s possible the underlying pipeline changed with HDRP.

    Many thanks
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    Take what I'm going to say as highly hypothetical :
    While it's not implemented now, it would be theoretically possible :
    • For decals on opaque objects, that are rendered between the depth prepass and other objects to DBuffer (buffers storing the decals values), you would need an other buffer for "vertex position".
    • For decals on transparent objects, they are rendered directly on the objects in cluster rendering. Once again, it would be possible to send vertex position informations to the object.
    But that's only in theory, it is not implemented and is unlikely to be.
     
  3. Scribbler_

    Scribbler_

    Joined:
    Aug 7, 2018
    Posts:
    9
    Thanks for the reply - really appreciated.

    Theoretically, would this be possible in a custom decal shader only, or an edit to the entire render pipeline? (So I don’t head down a dead end at the outset)
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    Nah, a custom decal shader will not be enough.
     
  5. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    does this mean if I have a decal projector which is a straight line, and I want to bend it around a corner on a flat surface, that it is impossible to do this? I noticed on the HDRP decal shader graph there is vertex options, I was hoping to be able to do it.