# WebGL: Render Warning non-power-of-2 / not a depth texture

**URL:** <https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191>\
**Category:** Questions\
**Created:** [February 5, 2019, 12:16pm UTC](https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191 "2019-02-05T12:16:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lump](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lump/32/594_2.png) [@Lump](https://forum.babylonjs.com/u/Lump)\
**Post date:** [February 5, 2019, 12:16pm UTC](https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191/1 "2019-02-05T12:16:16Z")

</div>

I am receiving a WebGL render warning on a scene, and I can’t see how I should fix it…

On Chrome I get the warning: `RENDER WARNING: texture bound to texture unit 8 and 18 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.`

and on Firefox I get: `drawElements: TEXTURE_2D at unit 1,4 and 10 is not a depth texture with TEXTURE_COMPARE_MODE, but the shader sampler is a shadow sampler.`

Can someone explain what these warnings mean in somewhat simple terms? 🙂 I have seen them addressed elsewhere online ( such as [here](https://stackoverflow.com/questions/47368120/render-warning-texture-bound-to-texture-unit-0-is-not-renderable-it-maybe-non?rq=1) and [here](https://stackoverflow.com/questions/21954036/dartweb-gl-render-warning-texture-bound-to-texture-unit-0-is-not-renderable) ) but I’m yet to find an intuitive explanation/one that suggests how I can fix it.

---

<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:** [February 5, 2019, 4:12pm UTC](https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191/2 "2019-02-05T16:12:26Z")

</div>

We need a repro to help you further. This could have a lot of cause so we will need to see it live

---

<div class="post-metadata">

**Author:** ![Lump](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lump/32/594_2.png) [@Lump](https://forum.babylonjs.com/u/Lump)\
**Post date:** [February 5, 2019, 4:40pm UTC](https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191/3 "2019-02-05T16:40:39Z")

</div>

I tried to repro in the playground to no avail… go figure! It isn’t causing any issues for me, just would rather not have the console warning

---

<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:** [February 5, 2019, 5:51pm UTC](https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191/4 "2019-02-05T17:51:13Z")

</div>

I agree. can you share your live page somewhere perphas?

---

<div class="post-metadata">

**Author:** ![Galen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/galen/32/539_2.png) [@Galen](https://forum.babylonjs.com/u/Galen)\
**Post date:** [February 6, 2019, 9:07am UTC](https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191/5 "2019-02-06T09:07:28Z")

</div>

@Lump,

I always use power of 2 textures, as there are many advantages beyond compatibility. There is far less computation on the GPU to render and update a non power of 2 texture. And if the texture is a power of 2 in both dimensions then WebGL can do higher quality filtering, it can use mipmap, and it can set the wrapping mode to `REPEAT` or `MIRRORED_REPEAT` .

This will be a big change in WebGL2, which will better support non power of 2. However, I’ll still continue to use power of 2 as it will still require more computation for non power of 2 textures.

Galen

---

<div class="post-metadata">

**Author:** ![Lump](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lump/32/594_2.png) [@Lump](https://forum.babylonjs.com/u/Lump)\
**Post date:** [February 6, 2019, 7:59pm UTC](https://forum.babylonjs.com/t/webgl-render-warning-non-power-of-2-not-a-depth-texture/1191/6 "2019-02-06T19:59:41Z")

</div>

@Deltakosh Sorry I forgot to reply! I can’t share the live page unfortunately as it’s a work project…

@Galen I wasn’t aware of the computation benefits - I’ll go back and double check my values. Thanks for the info!
