Open CakemonBot opened 1 year ago
Thanks for the workflow description. :)
Being able to visually modify the width of the rendered strands via ShaderGraph is a feature in progress.
I'd really like to look into solving this issue, are there any docs on how the strips are generated and the flow of the HLSL files?
This worked for my use case https://github.com/Unity-Technologies/com.unity.demoteam.hair/blob/master/Runtime/HairVertex.hlsl#L160
#if HAIR_VERTEX_ID_STRIPS
float3 vertexOffsetWS = vertexTangentWS * (_GroupMaxParticleDiameter * (vertexUV.x - 0.5)) * (1 - vertexUV.y * 0.9);
#else
float3 vertexOffsetWS = float3(0.0, 0.0, 0.0);
#endif
Is it possible to change the hair size, and make the root thicker and tips thinner? I guess it could be something to do with strand renderer - built in strip, but using this setting I cannot use custom material, nothing will be rendered in the scene.
My work flow: Set up a hair instance object> set strand renderer to built in strip, scale up strand diameter and hair can be seen rendered, but in same length Setup a shader like so
Apply it to the hair and the hair works weirdly
![image](https://user-images.githubusercontent.com/100847797/211459962-e9c0fcff-809c-4fa1-a705-8f99768cc2d0.png)
And if it required some shader knowledge it will be great if a sample shader can be provided, it's a bit advanced for me :)