# Incorrect Render Target Usage?

**URL:** <https://discourse.threejs.org/t/incorrect-render-target-usage/6463>\
**Category:** Questions\
**Tags:** render-target, webgl-renderer\
**Created:** [March 8, 2019, 6:30pm UTC](https://discourse.threejs.org/t/incorrect-render-target-usage/6463 "2019-03-08T18:30:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtwoodard](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mtwoodard/32/3990_2.png) [@mtwoodard](https://discourse.threejs.org/u/mtwoodard)\
**Post date:** [March 8, 2019, 6:30pm UTC](https://discourse.threejs.org/t/incorrect-render-target-usage/6463/1 "2019-03-08T18:30:20Z")

</div>

I’m trying to render to texture using a render target however the texture appears empty when using it. Excluding the final pass, the render target scene renders properly. The code is quite lengthy so you can find it at [this github repo](https://github.com/mtwoodard/hypVR-Ray/tree/separatepasses). The main js code is in js/HyperSpace.js. You’ll need to run a local server to view the page properly.

---

<div class="post-metadata">

**Author:** ![mrdoob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mrdoob/32/22417_2.png) [@mrdoob](https://discourse.threejs.org/u/mrdoob)\
**Post date:** [March 8, 2019, 10:07pm UTC](https://discourse.threejs.org/t/incorrect-render-target-usage/6463/2 "2019-03-08T22:07:02Z")

</div>

Do you mind creating a jsfiddle with only the code you are having issues with?

---

<div class="post-metadata">

**Author:** ![mtwoodard](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mtwoodard/32/3990_2.png) [@mtwoodard](https://discourse.threejs.org/u/mtwoodard)\
**Post date:** [March 8, 2019, 11:05pm UTC](https://discourse.threejs.org/t/incorrect-render-target-usage/6463/3 "2019-03-08T23:05:36Z")

</div>

No problem,[this is my initialization functions and the animation loop as well as some of the variable declarations.](https://jsfiddle.net/r0kwumtg/) Not the full code but hopefully it helps you get an idea of what’s going on.

I’m using WebGL2 for this project, I’m not certain if that could be a problem but it is something different from the example you have on the website.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [March 9, 2019, 1:51pm UTC](https://discourse.threejs.org/t/incorrect-render-target-usage/6463/4 "2019-03-09T13:51:07Z")

</div>

I think it’s better to share a runnable [live demo](https://jsfiddle.net/f2Lommf5/) and not just a code snippet so it’s possible to debug your issue 😉
