Josh Becker
Josh Becker

Reputation: 11

Threejs soft shadows for point light

Is there a way to have soft shadows with PointLight in Threejs?

Like in the picture below:

soft shadows

Upvotes: 1

Views: 1792

Answers (1)

Davide Carlier
Davide Carlier

Reputation: 129

Yes. To have soft shadows in your scene you have to set the renderer like this:

 var renderer = new THREE.WebGLRenderer();
 renderer.shadowMap.enabled = true;
 renderer.shadowMap.type = THREE.PCFSoftShadowMap; // the default is THREE.PCFShadowMap

Source: documentation

Upvotes: -1

Related Questions