Upgrading to r182 - Incorrect Point Light Shadows

Upgrading to r182 has caused my point light shadows to suddenly stopped working.

Directional Light and Spot Light shadows are still working.

Version 181:

In this scene I have two point lights casting shadows
here is one of the objects (r181)

Version 182:

only code change I have done is change PCFSoftShadowMap to PCFShadowMap.

My lights are configured so that the shadow map is only calculated once, so auto update is set to false and the shadow.needupdate is set to true when I make the light ‘visible’. i.e. when you go into the kitchen that is when the lights ‘turn on’

r182:

r182.mkv (7.4 MB)

r181:

r181.mkv (9.8 MB)

somethings definitely wrong

r182:

r181:

Can’t even show you the produced depth texture from Spector as it seems its not compatible with 182

also ignore the difference in width and height, something is wrong in 181 around webgl capabilities is leading to higher resolution depth textures, fixes itself with 182

r181:

r182:

Can you try it with the latest dev version from three.js/build at dev · mrdoob/three.js · GitHub ?

Maybe you have run into a regression that is already fixed.

If latest dev version does not help, can you try using auto-update of shadows? Maybe there is an issue in that context since afaic all official shadow examples we are testing with use auto-update so maybe something has been overlooked.

that can be corrected on your model’s pbr maps

No sorry that’s not quite right, shadow mapping has nothing to do with texture mapping

Can confirm that the latest dev branch does not fix it,
nor does setting auto-update to true.

trying now to get a replication in one of the three.js examples, but I am struggling to figure out what could be different about my set up compared to the three.js examples that could be causing this

Okay it turns out to be a shadow.bias issue

previous value:
shadow.bias = -0.0074;

setting to 0:

So it looks to be a combination of camera near and far and the shadow map bias regression

const shadow = bulbLight.shadow;			

shadow.camera.near = 0.01;
shadow.camera.far = 100;

shadow.bias = -0.0074;

r182: three.js/examples/webgl_lights_physical.html at 7567c5a450e9ae5c66f61f8b536f13f97f922970 · Shane-oo/three.js · GitHub

r182Replication.mkv (5.4 MB)

r181: three.js/examples/webgl_lights_physical.html at d103c28baa36ae63a88c21512310275cd195d6a7 · Shane-oo/three.js · GitHub

r181Replication.mkv (5.3 MB)

Point light shadows are now rendered differently and an update of the shadow bias value might be necessary.

The 0 value screenshot looks correct to me. Do you still experience visual issues after updating the bias?