Search Unity

HDRP Shader Graph two questions

Discussion in 'High Definition Render Pipeline' started by DuvE, Nov 15, 2019.

  1. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    169
    Hi,

    1. There are two nodes "Scene Color" and "Scene Color HD" in HDRP ShaderGraph. But apparently, they do not work, always displaying black color. How can I grab scene color than in SG?

    2. When creating a double-faced shader, how can I assign some value to the front face and other value to back face? In ASE there is "Switch by Face" node, you can plug fo example different color for front and back faces, can something similar be done in SG?
     
  2. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    To answer question 2, yes, you should be able to use the "Is Front Face" node connected to a branch node to get different values assigned to front and back faces.
     
  3. Tricktale

    Tricktale

    Joined:
    Jan 23, 2015
    Posts:
    42
    1. Make sure the shader surface type is set to transparent. It won't work with opaque and will display black as you've noticed. Also, make sure the material surface type is set to transparent too as this doesn't seem to update when changing the shader surface type.