Hi,
It is seems like a bug (all revisions affected) when shadow is truncated in some cases (example):
- There are two materials - first with FrontSide and visible set true, second with BackSide and visible set false:
const sphereMaterial = new THREE.MeshStandardMaterial( { side: THREE.FrontSide, color: 0xff0000 } );
const cloneMaterial = new THREE.MeshStandardMaterial( { side: THREE.BackSide, color: 0x0000ff } );
cloneMaterial.visible=false;
Shadow is painted correctly (!!!) if cloneMaterial visible is true (just comment cloneMaterial.visible=false;
and rerun)
- Same wrong shadows when both materials are visible and BothSide or FrontSide:
const sphereMaterial = new THREE.MeshStandardMaterial( { color: 0xff0000 } );
const cloneMaterial = new THREE.MeshStandardMaterial( { color: 0x0000ff } );
visibility of second material doesn’t affect on shadow at all.
How to resolve this issue if I need bias and it should be not 0 and ability to hide material to prevent its being painted in mesh that cast shadow ?