0
votes

I'm building a 3D environment using three.js , r76. I can't seem to get the shadows right.

In r71, I was pretty happy with the result, but it doesn't work the same in r76.

A fiddle to illustrate my problem:

r71: https://jsfiddle.net/sq2w15xy/

r76: https://jsfiddle.net/9uuq6s56/

As you can see, the shadow is black and pixelated in the newest revision. What changed since then? What can I do the get the same smooth shadow as in r71?

1

1 Answers

0
votes

I suppose the light's shadow.mapSize must be set first as it's otherwise set to ( 512, 512) by default.

        spotlight.shadow.mapSize.width = 2048; 
        spotlight.shadow.mapSize.height  = 2048;