I’ve been blocked into some error, that I couldn’t find a solution since weeks. So maybe you maybe you’ve already faced this problem or you have an idea how to rescue it:
In my project, I have two version:
** One that runs entirely on CPU that works great.
** And another one computed on shaders, but has some issue:
The precision of built-in functions in shaders (e.g. acos(x) ) are pretty bad, when two values are very close to each other, and therefore it totally spoils my visualization. I tried to add ‘highp’ in every function/variable but no improvement has been detected.
Here is the more interesting part: When I run my project on Ubuntu on my Virtual Machine (Windows as host), the precision error does not occur! Otherwise, the project run on shader does not seem to do better on all other machines that I tried on.
I tried as well to send a typed float Foat64Array using the 64Buffer but it seems that WebGL does not support it.
Thereby I’m in an impasse.
So here is my question:
Are there any solution to improve precision on built-in function such as cos or acos (eventually better than ‘highp’)?
Are there any possible solution to mimic 64-float on WebGL shaders?
I looked in the web for various solution for this kind of case, and it seems to be that all solutions that I saw handle only very basics math operation for the minimal decimal of the float such as addition or multiplication.
If is it not possible, can on in his app create a virtual graphics card (by suggesting to install plugins or extension in the browser) and force operation to be done in this part instead of the real GPU?
Thank you for your help!