Unity-Technologies / com.unity.demoteam.hair

An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity.
Other
719 stars 97 forks source link

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

Closed ShockWave2048 closed 1 year ago

ShockWave2048 commented 2 years ago

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

wojiuxuihuan commented 2 years ago

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).

Esjona commented 1 year ago

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