Search Unity

Canvas UI Color different from HDRP/Unlit Color

Discussion in 'High Definition Render Pipeline' started by rtilton1, Feb 21, 2020.

  1. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    I have a canvas UI with an Image and the color is set to pure red. I then have a cube next to the canvas with an HDRP/Unlit material also set to pure red. Through the same camera - the cube appears to be dimmer than pure red (color value seems lower). Both colors are identical in the inspector, but something is making it appear dimmer...

    I made sure all post-processing was off - toggled lighting - turned off static lighting skybox- etc- nothing helps or changes either color. What could be creating this color difference? Why would it be showing up less bright?

    Bellow are screenshots when trying a purple color...



    FWIW - my project is set to Linear colorspace. Just in case the canvas is rendering in gamma color space I tried the following:
    Code (CSharp):
    1.        
    2. Material m = this.GetComponent<Renderer>().material;
    3. Color c = m.GetColor("_UnlitColor");
    4. m.SetColor("_UnlitColor", c.gamma);
    5.  
    This resulted in the cube being even brighter than the canvas so I don't think it's a gamma/linear issue...

     
    Last edited: Feb 21, 2020
  2. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    Looks like when I change render pass to "After Post Process" the color shows up correctly

    So weird b/c my two post process volumes aren't on... not sure where this post process exists...If anyone has any idea where this post process exists please let me know... Would prefer to be able to turn this off..

    For reference - I disabled all post effects in 'HDRPDefaultSettings' and I turned off my Sky and Fog Volume and Post Process Volume. Using the default example scene out of the box with unity... Still there seems to be some sort of post processing that I'm not seeing b/c disabling those 3 didn't result in the correct color.
     
    Last edited: Feb 22, 2020
    Oyedoyin1 likes this.