Precision issue with r49
See original GitHub issueI updated my Three lib to r49 but i’m dealing with many precision issue when rendering my old scene (it was working fine with r48).
The issues only occur when rendering far away from the world origin (further than 2 000 000 on some axis).
1st : my ground is formed of many Meshs built with PlaneGeometry and i now have some 1 pixel width holes between my meshs when moving the camera.
2nd : i’m dealing with a strong precision issue (>50 world unit error) when using projector and Matrix / Vector multiplication.
I tried to revert the Matrix optimization stuff but i didn’t manage to get it working with all the function change in this release 😕
Issue Analytics
- State:
- Created 11 years ago
- Comments:28 (25 by maintainers)
Top Results From Across the Web
Rolex Oyster Precision for R49 758 for sale from a ... - Chrono24
Rolex Oyster Precision. 6466 ; Caliber. Movement, Manual winding ; Case. Case material, Steel ; Dial, Silver ; Dial numerals, No numerals ;...
Read more >15. Floating Point Arithmetic: Issues and Limitations — Python ...
Unfortunately, most decimal fractions cannot be represented exactly as binary fractions. A consequence is that, in general, the decimal floating-point numbers ...
Read more >Is floating point math broken? - Stack Overflow
This causes precision errors when doing floating point (decimal) calculations, in short, due to computers working in Base 2 while decimal is Base...
Read more >kenwood 5 disk cd player
I had the same problem with mine, had to buy a new player. ... will be impressed with a high-precision, multi-bit D/A converter...
Read more >Metal slug tank toy - La Bina Travel Designer
Precision manufacturing, handcrafted elegance, consistency, and pride are words that are ... "Metal Slug Tank Capsule Toys" Topic.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@m-schuetz: Thanks for your analysis - I had the same issue with in a similar setting. I was already thinking about more complex solutions (like in http://github.prideout.net/emulating-double-precision ), but it doesn’t seem to be required in my case as well.
I’d just suggest to use a local conversion Float32Array, so that you don’t need to create a new Object every time; also I think the use of || is wrong in your code (I might have missunderstood it, though):
@cipri-tom
In Matrix4.js, replace
with
and in WebGLUniforms.js replace
with
Seems to work for me. The matrices are converted to single precision float for the shaders which is fine because the translational terms of the world and the view matrices tend to cancel each other out. Make sure to use the combined “modelViewMatrix” in your shader.
On a related note, I’m just now switching to using Float64Array for the matrices in order to avoid confusing floating origin transformations. I can do a comparison for my use case when I’m done. Kind of glad to see that you just have to modify 2 lines to get double precision math on the CPU side.