mind-ar-js: Error compiling fragment (GPU)
Hi @hiukim while i was testing your example https://hiukim.github.io/mind-ar-js/samples/example1.html i receive this error:
gpu-browser.js:14991 Uncaught (in promise) Error: Error compiling fragment shader: Fragment shader compilation failed.
ERROR: 0:2: '' : integer constant overflow
ERROR: 0:67: '' : integer constant overflow
ERROR: 2 compilation errors. No code generated.
�
at WebGLKernel.build (gpu-browser.js:14991)
at WebGLKernel.run (gpu-browser.js:18496)
at shortcut (gpu-browser.js:18516)
at Tracker._combineImageList (tracker.js:334)
at new Tracker (tracker.js:38)
at eval (controller.js:84)
of course nothing can be tracked or displayed… Maybe my Android device is not supported? i tested with a Wiko View with Android 7.1.2 but i will test with another device. EDIT: tested on Chrome browser 86.04240.110
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (7 by maintainers)
@subjectdenied @kalwalt
I have just finished a big revamp, removing GPU.js completely. Hopefully it will solve a lot of these problems.
If you guys could try the example again with your devices (whatever devices you have, haha), that would be nice!
https://hiukim.github.io/mind-ar-js/samples/example1.html
it hangs at the “loading” for an example in example2, the error is about “precision missing”
Uncaught (in promise) Error: precision missing at lookupKernelValueType (webpack:///./node_modules/gpu.js/dist/gpu-browser.js?:13365) at Function.lookupKernelValueType (webpack:///./node_modules/gpu.js/dist/gpu-browser.js?:14602) at WebGLKernel.setupConstants (webpack:///./node_modules/gpu.js/dist/gpu-browser.js?:14908) at WebGLKernel.build (webpack:///./node_modules/gpu.js/dist/gpu-browser.js?:14944) at WebGLKernel.run (webpack:///./node_modules/gpu.js/dist/gpu-browser.js?:18496) at Detector.shortcut [as inputKernel] (webpack:///./node_modules/gpu.js/dist/gpu-browser.js?:18516) at Detector.detect (webpack:///./src/image-target/detectorGPU/detector.js?:149) at Controller.dummyRun (webpack:///./src/controller.js?:100) at NewSystem._startAR (webpack:///./src/aframe.js?:147)`
`
no problem. whenever you have time. Feel free to let me know if you encountered any troubles.
I guess you can try running the gpu.js examples with your devices and see if they works first.
gpu.js basically translate the js code into shader programs in webgl and reformat the result back. My experience is that most of the issues come from the js code failed to translate or the translated shader programs run differently in different devices.
The proper fix is probably figuring out what’s wrong and fixing the gpu.js. That’s the final move and can fix anything, but hard to do.
Sometimes I just do trial and error and see which lines of js code caused the problem, and rewrite it in some other ways hopefully to bypass the problems.
@kalwalt thx a lot.
Please noted that I’m using a custom branch of gpu.js instead of their current master. They are basically the same, but have one line difference here: https://github.com/hiukim/gpu.js/blob/1ab9497dfd05fdc9e62ea599adc6efb51abedbcd/src/backend/gl/kernel.js#L33
It’s to temporarily suppress an issue found in ios: https://github.com/gpujs/gpu.js/issues/632
Whenever you see “WebGLKernel”, it’s from the underlying gpu.js. I have experienced different behaviours in different devices with this library. I have tested with all my available devices and fixed a lot of things. Unfortunately, it’s really hard to debug without the actual devices.