Light passing through geometry?

image

I have a spotlight. right under my 2 objects.

const light3 = new THREE.SpotLight(0xFFC8C8, 10, 0);
light3.position.set(0, -100, 0);
light3.castShadow = true;

One of the objects is a geometry created with a Shape and ExtrudeGeometry, then it is rotated and translated a bit.

This geometry is cloned, and the clone is translated over the green axis.

Finally the 2 geometries are merged using BufferGeometryUtils.mergeBufferGeometries(…)

The resulting geometry is turned into a mesh and added to the scene.

const mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial({
		color: 0x111111,
		emissive: 0x202020,
		roughness: 0.5,
		metalness: 0.9992,
		side: THREE.DoubleSide,
	}), );
mesh.receiveShadow = true;
scene.add( mesh );

I am wondering why both times have lighting, while the bottom object is in the way of the light rays to the upper object. Do I need to update something on the geometries before/after merging them ?

Try this

mesh.castShadow=true;
renderer.physicallyCorrectLights=true;