Open Cloudwalk9 opened 10 months ago
Very interesting, I will test on a linux machine myself.
Just in case for repro, I'm using the nvidia proprietary driver in PRIME offloading of firefox but it also occurs with intel gfx
I tested on Linux, didn't work on Firefox but worked fine on Chromium. What GPU do you have exactly?
I tested on Linux, didn't work on Firefox but worked fine on Chromium. What GPU do you have exactly?
RTX A4000 Mobile (workstation grade counterpart to mobile RTX 3070 I think) and Intel iGPU in PRIME/Optimus configuration. Nvidia 535 driver.
Chromium browsers have issues using the Nvidia GPU in PRIME offload and I got it to work only once but don't exactly know what I did to force it before resetting everything due to other issues, so I'm basically stuck with Firefox.
The problem lies further up in the code. It would seem that wallTextureValues is not getting populated on Firefox, and it's full of 0s. This is not the case on Chromium. So this condition is always false.
Found this little nugget.
WebGL warning: readPixels: Format and type RGBA_INTEGER/<enum 0x1400> incompatible with this RGBA8I attachment. This framebuffer requires either RGBA_INTEGER/INT or getParameter(IMPLEMENTATION_COLOR_READ_FORMAT/_TYPE) RGBA_INTEGER/INT.
For some reason this fixes it. It probably blows up memory usage.
gl.readBuffer(gl.COLOR_ATTACHMENT2);
var wallTextureValues = new Int32Array(4 * sim_res_y);
gl.readPixels(simXpos, 0, 1, sim_res_y, gl.RGBA_INTEGER, gl.INT, wallTextureValues); // read a vertical column of cells
Using Int32Array and gl.INT where ever wallTextureValues is populated fixes both this issue, and the unreported issue of weather stations not working on Firefox. No side effects on Chrome.
Why? I don't know.
I finally got to testing it on Linux Firefox. Indeed the fix you suggested fixes the sounding graph. I will commit it now. Those few bytes of extra memory dont matter. However there seem to be a few more problems using Firefox on Linux:
Do you experience these same problems?
I want it to run on as many devices as possible and will do my best to fix all this
Save files are definitely broken. Not exactly a black screen but it renders the sky and no terrain. I haven't tested the weather station issue, but chances are it's another Firefox-specific bug if it works on Chrome.
Okay, I will fix all of these bugs soon. Thank you for your input!
Please tell me if this is still an issue
Only the lapse rate line seems to render.
Replacing
with
seems to fix it. This is probably not a proper fix but it's a clue what might be going wrong.