BabylonJS / Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
http://www.babylonjs.com
Apache License 2.0
23.09k stars 3.41k forks source link

OffscreenCanvas Textures Inverted #11059

Closed nmrugg closed 3 years ago

nmrugg commented 3 years ago

When running Babylon.js in a web worker using an OffscreenCanvas, it does not correctly invert images when loading textures.

Repro

Screenshots offscreen-canvas-bug

Desktop

Additional context I was able to work around this issue by supplying invertY to LoadImage() and adding imageOrientation: invertY ? "flipY" : "none" to createImageBitmap(). But, I'm not certain that is the best way to handle this issue.

deltakosh commented 3 years ago

cc @Popov72 to have a look Did you start a thread on the forum as mentioned on the template?

nmrugg commented 3 years ago

Did you start a thread on the forum as mentioned on the template?

No, I didn't sorry. I miss read that. I can open a thread there.

sebavan commented 3 years ago

https://forum.babylonjs.com/t/offscreencanvas-textures-are-inverted/23798

Closing for now and might reopen in a bit :-)