# Confused about readpixels()

**URL:** <https://forum.babylonjs.com/t/confused-about-readpixels/7536>\
**Category:** Questions\
**Created:** [December 12, 2019, 6:15am UTC](https://forum.babylonjs.com/t/confused-about-readpixels/7536 "2019-12-12T06:15:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chao\_Xu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/chao_xu/32/5964_2.png) [@Chao\_Xu](https://forum.babylonjs.com/u/Chao_Xu)\
**Post date:** [December 12, 2019, 6:15am UTC](https://forum.babylonjs.com/t/confused-about-readpixels/7536/1 "2019-12-12T06:15:26Z")

</div>

In babylon.js there exists two functions to read pixels, one is engine.readpixels() and the other texture.readpixels().

What i’m confused is engine.readpixels() only read an uint8array but support only read a small part of the framebuffer, and texture.readpixels() can read float and uint8 data, but read the whole texture at once, which is very slow when the texture is a big rendertarget.

My point is why texture.readpixels() can not read a small part of the texture.  
and which framebuffer is to read when there exists multirendertarget using engine.readpixels().

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [December 12, 2019, 4:02pm UTC](https://forum.babylonjs.com/t/confused-about-readpixels/7536/2 "2019-12-12T16:02:28Z")

</div>

Well I see no problem to add more parameters to texture.readPixel to define a rectangle in the texture to read

Fancy doing a PR?
