Skip to content

MotionBlurPass doesn't work with three v0.131.1 or above #26

@sidsethupathi

Description

@sidsethupathi

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.

// 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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions