fastiles icon indicating copy to clipboard operation
fastiles copied to clipboard

Displays only a single black box in Firefox 94.0.2 on elementary OS 6

Open ppvk opened this issue 4 years ago • 11 comments

My browser does seem to support webGL2, however fastiles fails silently. I've been able to make it work in chrome on this same device.

Screenshot from 2021-11-27 17-22-47 Screenshot from 2021-11-27 17-20-14

ppvk avatar Nov 27 '21 23:11 ppvk

Hi @ppvk ,

thanks for the bugreport. It might be related to Observable. What do you see (in browser, in console) when you simply open the Fastiles demo page? (Either by cloning and opening demo.html, or simply at https://raw.githack.com/ondras/fastiles/master/demo.html)

ondras avatar Nov 28 '21 08:11 ondras

Thank you @ondras, looks like we have the same black box, and no console output at all. Attached is a screenshot.

Screenshot from 2021-11-29 09-41-13

ppvk avatar Nov 29 '21 15:11 ppvk

...and yet something happened, because the small black square is not the default HTML present in the page.

I am not able to reproduce this, so I am going to need some more information. In particular,

  1. can you show the "Network" tab in devtools?

  2. what happens if you individually enter s, Scene and Palette into the Console?

  3. what happens if you execute s._draw() in the Console?

ondras avatar Nov 29 '21 18:11 ondras

Looks like everything is loading (aside from the favicon), and the objects you mentioned are defined. I did test both the Flatpak version of Firefox and the one directly downloaded from firefox.com, and found no difference.

Screenshot from 2021-11-29 12-40-40 Screenshot from 2021-11-29 12-41-35

ppvk avatar Nov 29 '21 19:11 ppvk

Hmm, looks like everything is correct in JS world. Just the video card is not rendering anything into the provided canvas :-(

If you edit the demo.html file and adjust the s.draw(...) line: what happens when replacing second/third argument (j*16+1) with 254? Is the output still the same black square?

ondras avatar Nov 29 '21 19:11 ondras

Also, is the size of the resulting <canvas> correct? (You can check that using the "Inspector" devtool - should be 192x192px)

ondras avatar Nov 29 '21 19:11 ondras

...and finally, what if you replace (still demo.html) the Palette.xterm256 with Palette.windows16, Palette.default or Palette.rexpaint ?

ondras avatar Nov 29 '21 19:11 ondras

Changing the second and third argument to 254 results in the same black square, and inspecting the canvas does indeed show that it is 192x192px. The black square is the same size as a single tile. Changing the palette chosen also does not change the output.

ppvk avatar Nov 29 '21 23:11 ppvk

Well, I am absolutely puzzled by this.

I have some other demos that use WebGL. Can you try them to see if they are also broken?

  • https://observablehq.com/@ondras/fragment-shader-raytracer
  • https://observablehq.com/@ondras/webgl-mandelbrot

ondras avatar Nov 30 '21 08:11 ondras

I will try to find a setup similar to yours where the rendering is broken. That seems to be only way to correctly detect and debug what the hell is really going on.

ondras avatar Nov 30 '21 08:11 ondras

I was able to view those other WebGL pages. There was no errors in the console.

I wonder if there's something undefined in the shader that is being ignored by firefox. As I stated before, it seems to only be firefox with this problem. I can get it to render properly on chrome. :/

In any case, there's no rush. I don't have a particular project in mind for this library, but I find it very interesting and wanted to contribute in some way, even if it's just reporting a bug or incompatibility.

Big fan of your work.

Screenshot from 2021-11-30 08-31-01

ppvk avatar Nov 30 '21 14:11 ppvk