Porting jMonkeyEngine to the Browser with WebGL2 and TeaVM (sourcecode released)

I tried your profile with firejail 0.9.66

firejail version 0.9.66

Compile time support:
        - always force nonewprivs support is disabled
        - AppArmor support is enabled
        - AppImage support is enabled
        - chroot support is enabled
        - D-BUS proxy support is enabled
        - file and directory whitelisting support is enabled
        - file transfer support is enabled
        - firetunnel support is enabled
        - networking support is enabled
        - output logging is enabled
        - overlayfs support is disabled
        - private-home support is enabled
        - private-cache and tmpfs as user enabled
        - SELinux support is enabled
        - user namespace support is enabled
        - X11 sandboxing support is enabled

but I couldn’t reproduce the issue. I will look into installing your exact version.

In the meantime i made a new build with webgl-lint enabled, maybe this can give us a better error report? https://3d7.rblb.it

new link same issue. on “preparing enviroment”

eapp.js:101 java.lang.IllegalStateException: Framebuffer object format is unsupported by the video hardware.

Maybe firejail have nothing to do with it.

Give me moment, i will ask other person with firejail(similar config) to try on other machine.

1 Like

On different machine with Debian (maybe more recent version) It works…

with firejail version:

firejail version 0.9.73 Compile time support:

  • always force nonewprivs support is disabled
    • AppArmor support is disabled
      • AppImage support is enabled
      • chroot support is enabled
      • D-BUS proxy support is enabled
      • file transfer support is enabled
      • firetunnel support is disabled
      • IDS support is disabled
      • networking support is enabled
      • output logging is enabled
      • overlayfs support is disabled
      • private-home support is enabled
      • private-lib support is disabled
      • private-cache and tmpfs as user enabled
      • SELinux support is disabled
      • user namespace support is enabled
      • X11 sandboxing support is enabled

So i really dont know what is difference for my machine that it do not work.

Same drivers and gpu?

NVIDIA-SMI 515.48.07 Driver Version: 515.48.07 CUDA Version: 11.7

so little more updated than my one

also chrome://gpu/

my one:

working machine one:

But is it still a 3060?
Is there any chance you can update the drivers?
If not i will try to build a test case that is pure webgl and see if we can at least isolate the issue to the 32x32 (and < ?) framebuffer.

yes

and this other machine run firejail with:

  1. firejail --profile=chrome-by-chromium /usr/bin/google-chrome-stable --disk-cache-dir=/dev/null --media-cache-dir=/dev/null

Is there any chance you can update the drivers?

We plan to update anyway, but after finish things working on. But not just now.

Based on all info it might be driver version or something that cause issue. But idk really.

got info that model rotation works kinda slow on other machine.(but maybe firejail slow down it)

Sketchfab works fine tho for me, but i understand its much different approach there.

In summary, if its just my machine having problem, its not so important it seems.
Would be cool if more people test if it work fine for them.
Tho would be cool if it work here too.

also tried on Raspberry Pi connected to TV without firejail

it did work, but freezed once model loaded and could not rotate or do anything.

Sketchfab were working there.

But i belive this is Javascript that cause some frame drops?

That was webgl-lint, since it checks for error on every gl call. (Also note that all the domains point to the same page to which i am redeploying, i am just adding them to bypass caching just in case).

I made a new build, this one bakes a bigger env map and cuts at 64x64 mip level, if we are correct, this one should work: https://3d8.rblb.it

1 Like

That was webgl-lint, since it checks for error on every gl call. (Also note that all the domains point to the same page to which i am redeploying, i am just adding them to bypass caching just in case).

ah, nice, so it can work much faster.

still(for my machine ofc): (and yes i open new link with 8 as version)

jmeapp.js:101 java.lang.IllegalStateException: Framebuffer object format is unsupported by the video hardware.

where is the log stopping now?

Oh i see, always on the first level. So the issue is not with the mipmap size, but actually with binding the framebuffer to a mip level. I will make some researches to see if there is a workaround.

2 Likes

One of the earlier builds did not, but now it’s working fine for me:
Linux Mint 21.1
Firefox 113.0.2 (64-bit) (no firejail)
AMD Radeon RX 6500 XT (driver 23.0.4)

1 Like

FYSA: it works for me also. From the first time I looked to now. Still works. Better now than before, maybe. (Larger in the frame and seems to drag a little smoother but to be honest I didn’t poke at it much before either.)

Windows 7 (yes, I know)
Firefox 113.0.1 (64-bit)
GeForce GTX 960

1 Like

Ricc said

That was webgl-lint, since it checks for error on every gl call. (Also note that all the domains point to the same page to which i am redeploying, i am just adding them to bypass caching just in case).

So i guess it can be much more smooth. :slight_smile:

I’ve deployed a temporary workaround, the new code should catch the exception and print a warning.

In this way in these (supposedly) broken drivers the scene is rendered with only the top mip level resulting in everything being a bit too shiny, but at least it won’t crash… can you try it: https://3d9.rblb.it ?

2 Likes

yes, it works perfectly now, and even very very smooth for me :slight_smile: did you also disabled webgl-lint each gl call?

1 Like

I am seeing an issue when I add SkyControl to my app. I get an error in the browser console:

com.jme3.renderer.RendererException: compile error in: ShaderSource[name=Shaders/skies/dome20/dome20.frag, defines, type=Fragment, language=GLSL100]
ERROR: 0:41: 'sampler2DArray' : syntax error

Seems to refer to line 41 in dome20.frag

uniform sampler2D m_Object0ColorMap;

Any ideas?
@sgold ?

1 Like