# Roof texture lost when using webgpu

**URL:** <https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396>\
**Category:** Questions\
**Tags:** webgpu, texture\
**Created:** [July 29, 2024, 8:25am UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396 "2024-07-29T08:25:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhy](https://avatars.discourse-cdn.com/v4/letter/z/9dc877/32.png) [@zhy](https://forum.babylonjs.com/u/zhy)\
**Post date:** [July 29, 2024, 8:25am UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396/1 "2024-07-29T08:25:29Z")

</div>

```auto
let roofMaterial = new StandardMaterial("roofMaterial");
roofMaterial.diffuseTexture = new Texture("src/assets/roof.jpg", scene);
roof.material = roofMaterial;

```

 ![屏幕截图 2024-07-29 162259](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/1/419f3a0d319e3b604f5d1dd9e4c3bd6c4201a779.jpeg)

but the texture of the main body of the house is still there, no problem in the webgl environment

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 29, 2024, 4:01pm UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396/2 "2024-07-29T16:01:38Z")

</div>

It won t be possible to help without a repro ☹

---

<div class="post-metadata">

**Author:** ![zhy](https://avatars.discourse-cdn.com/v4/letter/z/9dc877/32.png) [@zhy](https://forum.babylonjs.com/u/zhy)\
**Post date:** [July 30, 2024, 12:45am UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396/3 "2024-07-30T00:45:19Z")

</div>

[https://playground.babylonjs.com/#KBS9I5#71](https://playground.babylonjs.com/#KBS9I5#71)

switching to webgpu brings up

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 30, 2024, 6:23am UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396/4 "2024-07-30T06:23:14Z")

</div>

Ohhh it looks like jpg are not working in WebGPU, @Evgeni_Popov is it a known limitation ?

---

<div class="post-metadata">

**Author:** ![CrashMaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/crashmaster/32/23662_2.png) [@CrashMaster](https://forum.babylonjs.com/u/CrashMaster)\
**Post date:** [July 30, 2024, 7:45am UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396/5 "2024-07-30T07:45:07Z")

</div>

Possibly related, webgpu does not support rgb texture format:

> [@Why doesn't WebGPU tolerate TEXTUREFORMAT\_RGB?](https://forum.babylonjs.com/t/why-doesnt-webgpu-tolerate-textureformat-rgb/46163):
>
> I am curious as to why the WebGPU engine does not tolerate TEXTUREFORMAT\_RGB. If under the hood , it really needs to follow some RGBA layout , can’t the engine internals handle that conversion? PlayGround:

I guess a fix would be to convert to png to get the alpha channel back 🤔

---

<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:** [July 30, 2024, 7:45am UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396/6 "2024-07-30T07:45:29Z")

</div>

It’s a problem with the file itself, see my answer here:

> [@Playground for WebGPU not working](https://forum.babylonjs.com/t/playground-for-webgpu-not-working/47297/7):
>
> I do see the same thing than @RaananW on my side (Chrome 120.0.6099.218 (Official Build) (64-bit)). @jackny Are you sure WebGPU is in the list of supported engines in the Playground? [image] It already happened to me that after an update, my Chrome did not support WebGPU anymore (until the next update)… Regarding the black roof, it’s because there’s an error when reading roof.jpg. You can display the error by adding an observer to BABYLON.Texture.OnTextureLoadErrorObservable: It seems the…

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 30, 2024, 7:47am UTC](https://forum.babylonjs.com/t/roof-texture-lost-when-using-webgpu/52396/7 "2024-07-30T07:47:36Z")

</div>

You are the best !!!
