In the screenshot notice the dark line at the left edge of the shadow. Is it possible to remove this. It shouldn’t be there.
- Depends on how that line is created.
- Depends on how that shadows are created.
mesh.castShadow=false;
1 Like
if using shadow maps - but the shadows above look like ContactShadows a little, in which case
castShadow
probably won’t have much effect - the visibility of mesh would need to be toggled pre- and post- shadow plane rendering.
The default for mesh.castShadow is false, that didn’t fix it.
- The line is an unwanted artefact.
- light = new THREE.DirectionalLight();
light.position.set(1,15,1);
light.castShadow = true;
light.shadow.mapSize.width = 256;
light.shadow.mapSize.height = 256;
light.shadow.camera.near = 0.5;
light.shadow.camera.far = 25;
light.shadow.radius = 7;
light.shadow.blurSamples = 8;
any chance you can share a live example?
light.shadow.bias=-0.001;
Genius. Works perfectly.
1 Like