Three js - Different shadow maps for different lights

42 Views Asked by At

I have a three js scene with two lights. I want light A to use PCFShadowMap and light B to use BasicShadowMap. How to achieve that?

My main concern is performance. I am looking for a way to cast different quality shadows from different light sources.

1

There are 1 best solutions below

0
Mugen87 On BEST ANSWER

I want light A to use PCFShadowMap and light B to use BasicShadowMap. How to achieve that?

This is not possible. The type of shadow maps can only be configured globally on renderer level:

renderer.shadowMap.type = THREE.PCFShadowMap;

If you are concerned about performance, consider to lower the resolution of shadow maps which you can configure per light.

light.shadow.mapSize.width = 256;
light.shadow.mapSize.height = 256;