2

I am working with very high precision floats and i'm adding them to my buffer as vertices.

I have this 2 points that i'm adding to my buffer

{ x: 0.100000001, y: 0 }
{ x: 0.1, y: 0 }

I drew the buffer as points and i see one point. I checked the buffer (using the chrome extension WebGL Inspector) and i saw that both x values are 0.10000000149011612.

I kept on checking and i saw that Float32Array is the one who is doing it.

Tried using `Float64Array' but unfortunately webgl doesn't work with that.

Is there any solution for high precision vertices in webgl ?

Raziza O
  • 1,351
  • 1
  • 12
  • 31
  • if `Float32Array` is compatible with IEEE-754 single precision then it cannot go over 7 digits of precision – phuclv Nov 13 '14 at 12:48
  • This i understood after a while. :) The question is if there is some solution for my problem ? – Raziza O Nov 13 '14 at 12:56
  • I don't know if it supports double precision or not but did you try changing the precision like [this](http://stackoverflow.com/questions/13780609/what-does-precision-mediump-float-mean). Also read http://blog.hvidtfeldts.net/index.php/2012/07/double-precision-in-opengl-and-webgl/ – phuclv Nov 13 '14 at 14:11

0 Answers0