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

Transparent WebM videos do not render correctly #3526

Closed
saschagehlich opened this issue Dec 31, 2016 · 8 comments
Closed

Transparent WebM videos do not render correctly #3526

saschagehlich opened this issue Dec 31, 2016 · 8 comments
Labels
🔍 Needs Investigation Issue needs to be research or investigated further. 💾 v4.x (Legacy) Legacy version 4 support

Comments

@saschagehlich
Copy link

It seems that previously rendered video frames are not cleared:

https://jsfiddle.net/vm4h4928/

I dived into the code but could not find the cause of this issue. All you do is upload the texture, but this should also include transparent pixels?

@themoonrat themoonrat added Renderer: WebGL 🔍 Needs Investigation Issue needs to be research or investigated further. 💾 v4.x (Legacy) Legacy version 4 support labels Dec 31, 2016
@themoonrat
Copy link
Member

Interesting point - this only happens for WebGL. It displays fine on Canvas renderer

@saschagehlich
Copy link
Author

@themoonrat Anything new regarding this issue?

@englercj
Copy link
Member

Honestly not sure if this is a pixi bug since we just pass the video directly to the gl context as a texture and the browser takes care of it.

@barbarosso
Copy link

@englercj It seems to be a pixi4 problem
I forked the jsfiddle and changed it to pixiv3
That one seems to do it correctly.
https://jsfiddle.net/t06hep8m/

@barbarosso
Copy link

@englercj Me and my colleague @pietervanneste did some investagation.

It seems that following part is causing the problem.

if(newHeight !== this.height || newWidth !== this.width)
	{
		gl.texImage2D(gl.TEXTURE_2D, 0, this.format, this.format, this.type, source);
	}
	else
	{
    	gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, this.format, this.type, source);
	}

If we change it to

gl.texImage2D(gl.TEXTURE_2D, 0, this.format, this.format, this.type, source);

so we don't call gl.texSubImage2D, It seems to clear the texture after every frame.

@kurozael
Copy link

kurozael commented Jun 7, 2017

I can confirm that @barbarosso's fix does indeed work. Can we please get this fix applied to the latest version of Pixi.js as soon as possible?

@themoonrat
Copy link
Member

I believe this is fixed in v5

@lock
Copy link

lock bot commented Jul 8, 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 Jul 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔍 Needs Investigation Issue needs to be research or investigated further. 💾 v4.x (Legacy) Legacy version 4 support
Projects
None yet
Development

No branches or pull requests

5 participants