I feel like I'm missing something simple here.
I used JSFiddle by @WestLangley, which demonstrates how to cast a shadow from an object onto a plane.
Everything works as expected when the plane is filled with just color:
var groundMaterial = new THREE.MeshLambertMaterial({
color: 0xFF0000
});
Then I change it to use texture instead:
var groundMaterial = new THREE.MeshLambertMaterial({
// color: 0xFF0000,
map: texture
});
..all of a sudden, shadow is gone:
This happens with both MeshPhongMaterial
and MeshLambertMaterial
.
Note that neither camera position nor shadow configuration is changed. Everything stays the same, yet shadow is gone.
Should texture be "told" to receive light or is this something else?
Tested on r61, r66, r67.
This is a pretty old question, but just to provide some closure, I'd like to point out that the version that was having this issue has since been fixed. The fiddle used Three.js r66, but the most recent (r107 as of this writing) no longer has this problem:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With