You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The benefit is instant conversion of result to Float32Array:
varresult=newUint8Array(w*4);gl.readPixels(0,0,w,1,gl.RGBA,gl.UNSIGNED_BYTE,result);result=newFloat32Array(result.buffer);//← this guy is in theory very fast, instead of converting per-element
Just wanted to know your thoughts on that, because there are gl-texture2d-read-float and others depending on that.
The text was updated successfully, but these errors were encountered:
Tiny benchmark has shown that there is no difference.
I guess it would be easier for a user to get float32array in return, if uint8array is passed as an argument:
Hi @mikolalysenko @hughsk!
There is another solution from here:
The benefit is instant conversion of result to Float32Array:
Just wanted to know your thoughts on that, because there are gl-texture2d-read-float and others depending on that.
The text was updated successfully, but these errors were encountered: