Given a scene that contains multiple light sources, disabling casting shadows on only one of the lights will result with renderer crashing.
StackTrace:
three.js:16521 Uncaught TypeError: Cannot read property 'toArray' of undefined
at flatten (three.js:16521)
at PureArrayUniform.setValueM4Array [as setValue] (three.js:16999)
at Function.WebGLUniforms.upload (three.js:17248)
at setProgram (three.js:25307)
at WebGLRenderer.renderBufferDirect (three.js:24041)
at renderObject (three.js:24802)
at renderObjects (three.js:24772)
at WebGLRenderer.render (three.js:24549)
at render ((index):111)
This problem started occurring from version r108. In r107 the problem does not occur.
Examples:
Actually, I can not reproduce with latest dev
version:
https://jsfiddle.net/ewhgdyk4/1/
@moskopio Can you please verify?
https://jsfiddle.net/pbkx9mwg/ is running using r109 and crash does happen on this version.
However, it does work fine on https://jsfiddle.net/ewhgdyk4/1/ which is using latest dev :+1:
Thank you @Mugen87 !
I'm glad this issue is already resolved :sweat_smile: