Unity-Technologies/com.unity.demoteam.hair

Shader error in 'Hair/Default/HairMaterialDefaultLitSRP' in 2022.1.13f1

ShockWave2048 opened this issue · 2 comments

Shader error in 'Hair/Default/HairMaterialDefaultLitSRP' at /Store/Works/TestHairs00/Library/PackageCache/com.unity.demoteam.hair@7aa92e2cf9/Runtime/HairVertex.hlsl(27) (on d3d11)
Unity 2022.1.13f1
DX11, gtx3090, ryzen 3950
How can i fix this?
Thanks for answer!
Screenshot_2

It seems that the 'unity_MatrixPreviousMI' get defined twice due to the Conditional compilation problem, try fix it with these steps:
1.Embeded 'com.unity.demoteam.hair' package;
2.Open 'HairVertex.hlsl' and comment line 26~28:

//#ifndef UNITY_SHADER_VARIABLES_INCLUDED
//float4x4 unity_MatrixPreviousMI;
//#endif

#ifndef UNITY_PREV_MATRIX_I_M
#define UNITY_PREV_MATRIX_I_M unity_MatrixPreviousMI
#endif

3.Problem solved (Temporarily).

Also getting this - please solve ASAP as we shouldnt have to constantly fix package errors like this for something being advertised on youtube by unity