I am back to creativity after having spent all my spare time into gaming (finished Elden Ring, Diablo 4, Cyberpunk 2077, Baldur’s Gate 3, etc)
Next to my card game, I have now the new project to make the best looking scrabble game ever (what else :p) thanks to babylonjs, and after just one week, I am blown away by the results
My problem is that I would like to have the letters both casting shadows AND receiving shadows, but as soon as I combine both, the letters become dark, and don’t look to receive shadows anyway (was thinking there could be some problems with the light, but apprently not).
On that screenshot and demo you can try here Vite App the letters on the support letter are shadow casters
this.shadowGenerator.addShadowCaster(letter.mesh); but are not yet receiving shadows. The letters already on the board are the opposite, just receiving shadows
letter.mesh.receiveShadows = true;
When drag and dropping a letter from the support to the board I try to enable the shadow reception (ideally, would have both casting and recepting all time…)
Any idea why ?
I managed to reproduce it on the playground for shadow demo here https://playground.babylonjs.com/#IFYDRS#704
Adding this on line 62
torus.receiveShadows = true; and the torus is also becoming dark…