# Problem on understanding how to use \`renderer.copyTextureToTexture\`

**URL:** <https://discourse.threejs.org/t/problem-on-understanding-how-to-use-renderer-copytexturetotexture/40040>\
**Category:** Questions\
**Tags:** webgl-renderer\
**Created:** [July 6, 2022, 4:00am UTC](https://discourse.threejs.org/t/problem-on-understanding-how-to-use-renderer-copytexturetotexture/40040 "2022-07-06T04:00:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benzsuankularb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/benzsuankularb/32/22821_2.png) [@benzsuankularb](https://discourse.threejs.org/u/benzsuankularb)\
**Post date:** [July 6, 2022, 4:00am UTC](https://discourse.threejs.org/t/problem-on-understanding-how-to-use-renderer-copytexturetotexture/40040/1 "2022-07-06T04:00:40Z")

</div>

[Demo URL](https://jsfiddle.net/b2erLwqn/8/)

I’ve tried to use `renderer.copyTextureToTexture` with many of texture combinations.

It’s always throwing me the error.

```javascript
Uncaught TypeError: Failed to execute 'texSubImage2D' on 'WebGL2RenderingContext': Overload resolution failed.

```

Am I missing something prerequisite to using this method?

---

<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:** [July 6, 2022, 8:44am UTC](https://discourse.threejs.org/t/problem-on-understanding-how-to-use-renderer-copytexturetotexture/40040/2 "2022-07-06T08:44:24Z")

</div>

You have to wait until the source and destination textures are fully loaded so the `Texture.image` property is not `null`. `copyTextureToTexture()` assumes texture data are copied to an _existing_ (not uninitialized) texture.

Besides, texture are not created like so: `const texture1 = new THREE.Texture(10, 10);`.

This is no valid signature. First parameter is an `image`, second one is the `mapping`.
