Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
StefanLengyel opened this issue Aug 7, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@StefanLengyel
Copy link

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.

@blueyred
Copy link

blueyred commented Aug 9, 2023

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));
}

@StefanLengyel
Copy link
Author

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?

@fuglsang fuglsang added the documentation Improvements or additions to documentation label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants