Search Unity

Question How do I correct UVs when sampling world position as UVs for Decal shader?

Discussion in 'Shader Graph' started by Roggi_, Apr 30, 2020.

  1. Roggi_

    Roggi_

    Joined:
    May 14, 2014
    Posts:
    84
    Iam making a HDRP decal shader, trying to project some numbers on a terrain. I'd like to replace UV coordinates with XZ coords from world position. But when I do that, the depth is basically set to the far plane of the decal projector, instead of the image being projected on the geometry. Is there any way around that?
    Here is what it should look like (using default non world space UVs):



    And what Iam getting:
     
  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    163
    This was a bug, it's been fixed in the repository and should be available in the next preview release of 9.0.0 if you're using 2020.1
     
    Roggi_ likes this.
  3. OliverVSmith

    OliverVSmith

    Joined:
    Nov 7, 2017
    Posts:
    51
    We're experiencing the same issue in HDRP 7.3.1 Unity 2019.3
    Will the fix be backported? We aren't in a position to upgrade our Unity Version from 19.3.x, nor from 7.x for HDRP.
    https://forum.unity.com/threads/decal-graph-with-world-space-uvs.901091/