Read out the contents of a floating-point gl-texture2d.
This will eventually be supported natively in WebGL (it's listed in the OpenGL ES 3 spec), but this fills that need until then!
Reads out the contents of
glTex2d, which should be an instance of
gl-texture2d. When complete,
done(err, data) will be called where
Float32Array containing the resulting floats in the texture.
const canvas = documentconst gl = canvasconst read =const Texture2d =const baboon =const assert =const texture =
A few things to note:
gl.FLOATtextures are currently supported. Pull requests are, however, very welcome! :)
See stackgl/contributing for details.
MIT. See LICENSE.md for details.