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

v2.0.0 displacementFilter multiple canvases #1122

Closed
glafarge opened this issue Nov 5, 2014 · 10 comments
Closed

v2.0.0 displacementFilter multiple canvases #1122

glafarge opened this issue Nov 5, 2014 · 10 comments
Labels
🕷 Bug Verified that it’s actually a legit bug that exists in the current release.
Milestone

Comments

@glafarge
Copy link
Contributor

glafarge commented Nov 5, 2014

Unexpected result with DisplacementFilter when I have more than one canvas in page.

v1.6.1

v2 0 0

Two fiddles to compare :
v1.6.1 : http://jsfiddle.net/glafarge/6h84bpnk/
v2.0.0 : http://jsfiddle.net/glafarge/6h84bpnk/1

@glafarge
Copy link
Contributor Author

glafarge commented Nov 5, 2014

Problem occurs with displacement shader too (even with one canvas) : http://jsfiddle.net/glafarge/rf6xybm0/.

@edankwan
Copy link

edankwan commented Nov 6, 2014

I am having a similar issue with custom shaders.

If you copy the url of the diffuse image and paste it as the displacement map image url, you will find out you will get the same incorrect result for the 2nd and 3rd instances.

It seems that Pixi will lose the texture after the first Pixi instance being created.

@edankwan
Copy link

edankwan commented Nov 6, 2014

This is a half fix for your case like what I did in the pull request:
http://jsfiddle.net/6h84bpnk/3/

In your case, because the displacementFilter added the eventListener into the Texture and once the image is loaded. There must be some messed up with the event listener that the off() call removed another function or something. If you commented the removeEventListener line like this:
http://jsfiddle.net/6h84bpnk/4/

You can see the problem is resolved(sort of).

@glafarge
Copy link
Contributor Author

glafarge commented Nov 6, 2014

Thank you Edan ! I was stuck into this bug since 2 days !
I took that as a chall but you've fixed it in couple of hours :)
Cheers !

@edankwan
Copy link

Hi @glafarge, please check if the latest dev branch fixed the bug?

@glafarge
Copy link
Contributor Author

Hi @edankwan !
For my specific use case, it doesn't solve the problem.
Displacement maps are now working, but I cannot use more than 3 instances and I cannot find out why. For the moment, I switch back to v1.6.1.

@englercj
Copy link
Member

englercj commented Jan 8, 2015

This issue may be caused by #1238, hopefully this will be fixed in v3

@englercj englercj added the 🕷 Bug Verified that it’s actually a legit bug that exists in the current release. label Jan 8, 2015
@englercj englercj added this to the v3.0 milestone Jan 8, 2015
@GoodBoyDigital
Copy link
Member

Boom! works like a champ in v3!

@glafarge
Copy link
Contributor Author

Thank you !! :)

@lock
Copy link

lock bot commented Feb 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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

4 participants