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

Question Decal shader triplanar.

Discussion in 'Shader Graph' started by koirat, Mar 16, 2022.

  1. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,008
    So I got this idea to make triplanar decal shader.
    Just slapping triplanar node into graph was not enough since it will only work in a projector direction, and sides are going to be stretched.

    I guess I need surface data to make it work as intended.
    Any ideas to obtain position and normal of pixel a decal is projected on.
     
    Lars-Steenhoff likes this.
  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,008
    Hi, after almost a year I'm bumping my own post.
    Is it possible to have a Triplanar decal shader in HDRP at all ?
     
  3. NathanNie

    NathanNie

    Joined:
    Jan 29, 2022
    Posts:
    2
    Sample Question
     
  4. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    83
    Is there no way to achieve this? It is pretty annoying that there is no way to "wrap" some decal around an object.
    Say I want to display a target icon onto something I shoot at, when that thing is a cube, the texture will stretch out on its sides when the projection comes at the direction of one of the normals of the cubes faces.