Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sidsethupathi opened this issue Feb 12, 2022 · 1 comment
Open

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

sidsethupathi opened this issue Feb 12, 2022 · 1 comment

Comments

@sidsethupathi
Copy link

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;
@gkjohnson
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants