Shadow cast problems

If you set it to receive and cast shadows, you will run into a quality problem.

Are there any options for this?

.castShadow = true;
.receiveShadow = true;

the problem is the shadows. try to play with these variable. (Most of the times the problem is the Bias)

renderer.shadowMap.type = THREE.PCFShadowMap
directionalLight.shadow.mapSize.set(512 * 2, 512 * 2);
directionalLight.shadow.camera.near=YOUR INT VALUE;
directionalLight.shadow.camera.far=YOUR INT VALUE;
directionalLight.shadow.normalBias = YOUR FLOAT VALUE (Exj: 0.1);
directionalLight.shadow.bias = YOUR FLOAT VALUE (Exj: -0.0001);

Thank you for answer.

renderer.shadowMap.type = THREE.PCFSoftShadowMap
directionalLight.shadow.normalBias = 0.5
directionalLight.shadow.mapSize,width= 512 * 4
directionalLight.shadow.mapSize,height= 512 * 4