You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: This is getting called just to set 'currentRenderState' in the renderer
// NOTE -- why do we need this?
renderer.compile(scene,camera);
Based on the comment, the call to renderer.compile is used to set currentRenderState in the renderer because it's then subsequently used in renderer.renderBufferDirect. However this three PR (mrdoob/three.js#22220) now sets currentRenderState = null at the end of the renderer.compile call.
Totally understand that renderer.renderBufferDirect isn't supposed to be part of the public API so a quick solution might not be feasible, but wondering if you (or people stumbling into this issue) have any thoughts.
The ultimate error I'm seeing is Cannot read properties of null (reading 'state') from setProgram inside WebGLRenderer on this line:
const lights = currentRenderState.state.lights;
The text was updated successfully, but these errors were encountered:
Hello! I don't maintain all of these examples to keep them up to date but I'm happy to take a PR for them if you have any fixes. I'm sure it could be fixed by removing renderBufferDirect, though, and using renderer.render instead.
Thanks for putting this repo together, really helpful to see some example code!
I ran into an issue with the
motionBlurPass
example that I think boils down to the these lines.threejs-sandbox/motionBlurPass/src/MotionBlurPass.js
Lines 164 to 166 in a8b6f66
Based on the comment, the call to
renderer.compile
is used to setcurrentRenderState
in the renderer because it's then subsequently used inrenderer.renderBufferDirect
. However this three PR (mrdoob/three.js#22220) now setscurrentRenderState = null
at the end of therenderer.compile
call.Totally understand that
renderer.renderBufferDirect
isn't supposed to be part of the public API so a quick solution might not be feasible, but wondering if you (or people stumbling into this issue) have any thoughts.The ultimate error I'm seeing is
Cannot read properties of null (reading 'state')
fromsetProgram
inside WebGLRenderer on this line:The text was updated successfully, but these errors were encountered: