How can I improve my hair card rendering performance in Threejs?

Free hair model from
Fibers hair - Download Free 3D model by klrxyz [94022ac] - Sketchfab

I think the depth-test gives the wrong result.

I set up my material like this , where is wrong?

							mesh.castShadow = true;
							mesh.receiveShadow = true;
							mesh.material.alphaTest = .35;
							mesh.material.side = THREE.DoubleSide;

							mesh.material.depthTest = true;
							mesh.material.depthFunc = THREE.LessDepth;
							mesh.material.depthWrite = false;
							mesh.material.flatShading = false;
1 Like

u need to convert the materials into physically based materials in THREEjs so get the same effect from sketchfab

Thanks, But I tried and it still looks bad of depth-test and some flat shading…

why set depthWrite to false on an opaque material?

1 Like

It finally works, Thanks buddy.

1 Like