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

Bug: Renderer's state isn't reset completely #10484

Open
codedpalette opened this issue Apr 28, 2024 · 1 comment
Open

Bug: Renderer's state isn't reset completely #10484

codedpalette opened this issue Apr 28, 2024 · 1 comment
Assignees
Labels
🕷 Bug Verified that it’s actually a legit bug that exists in the current release.

Comments

@codedpalette
Copy link
Contributor

Current Behavior

When sharing pixi.js canvas with other frameworks (like three.js) and calling renderer.runners.reset.emit() between rendering with three and pixi, pixi.js is unable to render the scene, and webgl warning INVALID_OPERATION: uniformMatrix3fv: location is not from current program is emitted in the console.

Expected Behavior

Both frameworks are able to render their corresponding scenes successfully

Steps to Reproduce

  1. Create Pixi.js WebGLRenderer
  2. Create Three.js WebGLRenderer and pass it the canvas that Pixi.js Renderer created
  3. Run pixiRenderer.runners.reset.emit()
  4. Render something with Pixi.js
  5. Run `threeRenderer.resetState()
  6. Render something with three.js
  7. Go to step 3

Next render from Pixi.js will fail, while three.js will render successfully

Environment

Possible Solution

If instead of renderer.runners.reset.emit() you call renderer.runners.contextChange.emit(renderer.gl) the problem goes away

Additional Information

No response

@GoodBoyDigital GoodBoyDigital self-assigned this Apr 29, 2024
@GoodBoyDigital
Copy link
Member

heya, sorry for the late response on this one! we will get to it soon!

@Zyie Zyie added the 🕷 Bug Verified that it’s actually a legit bug that exists in the current release. label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕷 Bug Verified that it’s actually a legit bug that exists in the current release.
Projects
None yet
Development

No branches or pull requests

3 participants