Unity-Technologies/com.unity.demoteam.hair

How to create a colour gradient from the bottom to the top of the hair?

Opened this issue · 2 comments

Hello,
Can someone help me? How can I achieve gradient like this?

image

my current situation:

image
image

Thank you!

Appreciate your help in advance.

you can probably use the UV.y in the shader - as ana example;


float4 UnlitFrag(UnlitVaryings IN) : SV_Target
{
return float4(IN.strandColor, 1.0) * (0.5 +( 0.5 * IN.strandUV.y));
}

Thank you @blueyred, I'm new in UNITY. That means I don't use the Shader editor but I open the shaders code and add/edit these lines?