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 Wrong colors in attempt to recreate Unity's color picker (linear/gamma space issue ?)

Discussion in 'Shader Graph' started by anthonov, Jul 22, 2022.

  1. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    So as the title says I'm trying to somehow recreate the Unity's picker color in my project.
    I dont use the Shader Graph quit often and I'm bad at writing shaders.
    You can see in the capture that the result I get is not what I should get.
    My project is in Linear color space and I think this is related to my shader issue.
    Is there a magic button somewhere to convert my shader to the right color space ?
    Or maybe I have to hardcode some power() in the shader to correct the color ?
    [EDIT]
    with a second look, if it were a color space issue, I should at least get pure white at the extrem left part of the saturation preview, but I have grey. so really I don't know whats wrong here.
    [EDIT 2]
    I did a wrong use of the saturation node. I think it can not output white from a red color.
    Capture color picker shader.JPG
     
    Last edited: Jul 22, 2022
  2. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    got it. Capture color picker shader right.jpg