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
After calling renderer.resetState(), the next three.js render does not call enableVertexAttribArray, or vertexAttribPointer.
To Reproduce
In a situation where three.js is being used in conjunction with other webgl shaders on the same webgl context, if another shader calls gl.enableVertexAttribArray or gl.vertexAttribPointer, three.js does not reset that state on subsequent render calls even if renderer.resetState() is being called.
See live demo of the issue on the jsfiddle below. The webgl shader is not actually doing anything, it is just there to demonstrate the effect of calling gl.enableVertexAttribArray.
Comment/uncomment lines 93-94 to demonstrate the issue.
One workaround is to clear and re-create the scene every render call but obviously that's terrible for performance, so hopefully I can find a way to get three.js to re-set the vertex array bindings.
Expected behavior
WebGLRenderer.resetState() should clear the cached state for these buffers and make the necessary webgl calls on subsequent render.
I opened PR #23689 in an attempt to fix this myself, but the e2e testing caught two issues so I've closed it for now.
Platform:
Device: Desktop
OS: MacOS
Browser: Firefox
Three.js version: 0.138.0
The text was updated successfully, but these errors were encountered:
Describe the bug
After calling
renderer.resetState()
, the next three.js render does not callenableVertexAttribArray
, orvertexAttribPointer
.To Reproduce
In a situation where three.js is being used in conjunction with other webgl shaders on the same webgl context, if another shader calls
gl.enableVertexAttribArray
orgl.vertexAttribPointer
, three.js does not reset that state on subsequent render calls even ifrenderer.resetState()
is being called.See live demo of the issue on the jsfiddle below. The webgl shader is not actually doing anything, it is just there to demonstrate the effect of calling
gl.enableVertexAttribArray
.Comment/uncomment lines 93-94 to demonstrate the issue.
https://jsfiddle.net/tom3000/us0bh6v1/127/
One workaround is to clear and re-create the scene every render call but obviously that's terrible for performance, so hopefully I can find a way to get three.js to re-set the vertex array bindings.
Expected behavior
WebGLRenderer.resetState()
should clear the cached state for these buffers and make the necessary webgl calls on subsequent render.I opened PR #23689 in an attempt to fix this myself, but the e2e testing caught two issues so I've closed it for now.
Platform:
The text was updated successfully, but these errors were encountered: