Jump to content

PixiJS with ThreeJS


Jimothy
 Share

Recommended Posts

@ivan.popelyshevI've managed to get something working by doing this in version `0.127.0`

this.threeRenderer.state.reset();
this.threeRenderer.render(this.threeScene, this.threeCamera);
this.threeRenderer.state.reset();

this.pixiRenderer.reset();
this.pixiRenderer.render(this.pixiScene);
this.pixiRenderer.reset();

 

However when i try to enable shadows the ThreeJS screen goes completely black.

this.threeRenderer.shadowMaps.enabled = true

When I remove the Pixi renderer the shadows start working again. Any ideas on how to fix this?

 

Here is the code I'm currently using. Uncommenting line 95 causes the issues

https://gist.github.com/Zyie/e655cc3bd3d42483213620f4c0668108

Edited by Jimothy
Link to comment
Share on other sites

Any ideas on how to fix this?

most probably threeRender doesnt wholy implement state reset(), so it things that specific texture is bound or framebuffer is bound, e.t.c.

I had problems like that through different versions, usually the best way is to just copy whole WebGLRenderer webgl file and add whatever needed in reset().

I cant help with it right now because i already have many help requests about my plugins in the queue.

Edited by ivan.popelyshev
Link to comment
Share on other sites

  • 6 months later...

Hello, just wanted to check if there is any update on this topic and any working examples for pixi v6? I also would like to try integrate three.js (some ready made code) with pixi.
@ivan.popelyshev, is this the suggested way for updating the pixi renderer? Are there any pitfalls/issues that you've encountered based on your experience?
 

this.threeRenderer.state.reset();
this.threeRenderer.render(this.threeScene, this.threeCamera);
this.threeRenderer.state.reset();

this.pixiRenderer.reset();
this.pixiRenderer.render(this.pixiScene);
this.pixiRenderer.reset();

Thank you very much!

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...