# Render Target Data?

**URL:** https://forum.babylonjs.com/t/render-target-data/29948
**Category:** Questions
**Created:** [May 2, 2022, 7:56pm UTC](https://forum.babylonjs.com/t/render-target-data/29948 "2022-05-02T19:56:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Butterwell](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/butterwell/32/9738_2.png) [@Butterwell](https://forum.babylonjs.com/u/Butterwell)
#### Post date: [May 2, 2022, 7:56pm UTC](https://forum.babylonjs.com/t/render-target-data/29948/1 "2022-05-02T19:56:15Z")

</div>

[https://playground.babylonjs.com/#645DP4#16](https://playground.babylonjs.com/#645DP4#16)  
I’d like to compare (in JavaScript) the result of a render target texture with a dynamic texture (2D) in order to debug/tune/hack on sdf / msdf fonts. In the playground, the left “a” is shader generated, the center is generated with a drawText, and the right is a render target of the left. Is it possible to get the render target texture data, akin to what you can do with a 2D context? (at line 225). (Suggestions on how to do the same an easier or different way also welcome.)

---

<div class="post-metadata">

### Author: ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)
#### Post date: [May 2, 2022, 8:40pm UTC](https://forum.babylonjs.com/t/render-target-data/29948/2 "2022-05-02T20:40:31Z")

</div>

You can get the RTT’s pixels by calling [readPixels](https://doc.babylonjs.com/typedoc/classes/babylon.rendertargettexture#readpixels). Here I just logged the pixel array after waiting for them to be read for example. 🙂

> **[Babylon.js Playground](https://playground.babylonjs.com/#645DP4%2312)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes
