Search Unity

What is scene color node actually supposed to be on HDRP?

Discussion in 'High Definition Render Pipeline' started by RR7, Sep 11, 2020.

  1. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    If I take a grey terrain and put a transparent plane over it, with a shader graph that just has scene color node applied to base color, instead of the plane being the same color as the item below it, it kinda has a red tint. Why is this? What does the scene color reoresent in HDRP if not the color before it draws the pixel?

    is there some other magic I need to do in HDRP to make this work?
     
  2. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
  3. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    Sorry i have already tried both nodes. i get how to make it transparent, just that i cant get rid of this red tint (see attached pic) and i don't know why...
     

    Attached Files:

  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
  5. uMotiejus

    uMotiejus

    Unity Technologies

    Joined:
    May 13, 2019
    Posts:
    12
    Hello, please take a look at the attached gif. Notice Material type in the inspector is Transparent and when HD Scene Color node is connected, we project a shadow from a transparent object on an opaque one. I've checked this with Unity 2019.4.9f1 and HDRP 7.5.1
     

    Attached Files:

  6. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    i dont understand what this post means to me. are you acknowledging the problem in HDRP? my object isn't casting a shadow. but i see in that GIF that as soon as the HD Scene color is applied, the cube itself gains a red tint, the exact problem i'm having.
     
  7. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    hmm... do you have auto exposure in your scene? if it is the case could you switch to fix exposure?
     
  8. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    no, its set to fixed and 0, no compensation, adjusting this in any way does not stop the red tint. auto exposure does not stop it. i tried the shader graph linked above with scene color and HD scene color and it still has the red tint.
     
  9. uMotiejus

    uMotiejus

    Unity Technologies

    Joined:
    May 13, 2019
    Posts:
    12
    Well the red tint in my scene is caused by the sun. The cube is still using Lit shader so lights can affect it. Could this be the same reason of seeing red tint in your scene too?
     

    Attached Files:

    • temp.gif
      temp.gif
      File size:
      517.7 KB
      Views:
      348
  10. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    Its a good call. I don't have a sun or directional light, the scene is at night, however the plane is lit by two 5000K area lights nearby.

    If I use an Unlit master node then the color looks mostly as expected without the tint, but I lose the normal map, which is why I'm using a Lit shader in the first place.

    So the lights are what's causing it, but why is there a red tint on it and not on the surface below, they are lit by the same 5000k light, only one shader has the scene color node and one doesn't.
     
  11. uMotiejus

    uMotiejus

    Unity Technologies

    Joined:
    May 13, 2019
    Posts:
    12
    It is hard to evaluate without seeing the project. Maybe you could strip it down, make a simple repro and file a bug report? Then we would look at it and identify what the exact issue is.
     
    Last edited: Sep 17, 2020