evanw / glfx.js

An image effects library for JavaScript using WebGL
https://evanw.github.io/glfx.js/
MIT License
3.26k stars 402 forks source link

Firefox Showing Black Empty Canvas #53

Closed duckzland closed 1 year ago

duckzland commented 3 years ago

When using the latest firefox version 79, the canvas element is just showing a black image, while it is working fine under chrome.

The browser throwing warning:

WebGL warning: checkFramebufferStatus: Using format enabled by implicitly enabled extension: WEBGL_color_buffer_float. For maximal portability enable it explicitly.

Snippet code to build the fx canvas code which is working fine at chrome

let img = new Image();
let canvas = fx.canvas();

img.onload = () => {
     let texture = canvas.texture(img);
     canvas.draw(texture);
     canvas.update();
}

// Base64 is base64 encoded image
img.src = base64;

Is there a way to circumvent the problem?

Thanks in advance

Axel-Jacobsen commented 2 years ago

For the future: I got the same warning. The warning is gone with

let canvas = fx.canvas()
let texture = canvas.texture(img)
texture._.gl.getExtension('WEBGL_color_buffer_float')

For Duckzland, I am not sure what the issue is. It has been two years, so maybe you've moved past the issue?

duckzland commented 2 years ago

for me it was firefox problem, after reporting it to firefox dev's they fixed the problem, havent retried it again now

Axel-Jacobsen commented 2 years ago

OK interesting - I am/was on Firefox Developer Edition 98, perhaps I have some experimental feature on.

duckzland commented 2 years ago

firefox's dev told me video card might also cause the problem. I'm not sure about it though