# Integer Texture don't work well

**URL:** <https://forum.babylonjs.com/t/integer-texture-dont-work-well/36303>\
**Category:** Bugs\
**Created:** [December 6, 2022, 2:22pm UTC](https://forum.babylonjs.com/t/integer-texture-dont-work-well/36303 "2022-12-06T14:22:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Magicodec](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Magicodec](https://forum.babylonjs.com/u/Magicodec)\
**Post date:** [December 6, 2022, 2:22pm UTC](https://forum.babylonjs.com/t/integer-texture-dont-work-well/36303/1 "2022-12-06T14:22:13Z")

</div>

Hi,

I tried to upload integer red texture, but it does not work well.  
Anybody can check below code and let me know the reason?  
The screen wanted to be red color, but it is black screen now.

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

Thanks,

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [December 6, 2022, 3:24pm UTC](https://forum.babylonjs.com/t/integer-texture-dont-work-well/36303/2 "2022-12-06T15:24:30Z")

</div>

You should use `NEAREST` for the sampling mode as there’s no mipmaps and a single pixel in the texture:

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

Though I don’t know why it doesn’t work as you are using `texelFetch` in the shader which should not depend on the sampler filtering…
