Open mattdesl opened 8 years ago
Reproduced by utilising an EPSILON of Math.pow(2, -50)
The problem arises when controls or cameras utilise an EPSILON small enough to allow matrices to be passed to gl-mat4/invert having both 1) non-zero determinants and 2) cells whose inverted values explode to infinity when stuffed into Float32Array
s.
new Float32Array([Math.pow(2, 127)])
// [1.7014118346046923e+38]
new Float32Array([Math.pow(2, 128)])
// [Infinity]
new Float64Array([Math.pow(2, 127)])
// [1.7014118346046923e+38]
new Float64Array([Math.pow(2, 128)])
//[3.402823669209385e+38]
Occasionally with
orbit-controls
, when you drag way up and then left or right, the scene will appear "flipped" like everything is inverted somehow. http://jam3.github.io/orbit-controls/At first I thought this was because I'm using wireframes (i.e. no point of reference for depth), but I saw it a while back with a solid mesh where there was no question that it should not look like that.
It's hard to reproduce and I'm not sure what is causing it, so it might be a tricky bug to track down. :smile: