# Loading black textures in WebGPU on AMD

**URL:** <https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420>\
**Category:** Bugs\
**Tags:** webgpu\
**Created:** [December 17, 2024, 9:53am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420 "2024-12-17T09:53:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yee7i](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yee7i/32/44277_2.png) [@Yee7i](https://forum.babylonjs.com/u/Yee7i)\
**Post date:** [December 17, 2024, 9:53am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/1 "2024-12-17T09:53:22Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/0/c047d2afb0dcec6f38b3b0b49329d94073eef8c7.png)  
Textures load as black when using an AMD RX7900XTX using WebGPU (not tested on other AMD cards, possibly same outcome) as shown in the image using [Create a Simple World Series | Babylon.js Playground](https://playground.babylonjs.com/#KBS9I5#71)  
Drivers version 24.12.1 (latest).

---

<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 17, 2024, 10:20am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/2 "2024-12-17T10:20:33Z")

</div>



---

<div class="post-metadata">

**Author:** ![Tricotou](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tricotou/32/5844_2.png) [@Tricotou](https://forum.babylonjs.com/u/Tricotou)\
**Post date:** [December 17, 2024, 10:29am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/3 "2024-12-17T10:29:00Z")

</div>

Hello and welcome 🙂

Indeed there is something strange here.  
On my side (Nvidia) it would load fine on WebGL2, but in WebGPU the roof is black 🤔

 ![Screenshot from 2024-12-17 11-19-55](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/b/dbf7aa80e88ca0253a77b4a4564175db387678f1.png)

Also the texture is seen as transparent 256 x 256 in the inspector, while [original](https://assets.babylonjs.com/environments/roof.jpg) is 780 x 985 :

 ![Screenshot from 2024-12-17 11-27-26](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/c/2cb90b05731f154ec1485740490a92522f77605e.png)

Replacing by another jpg path works though 🤔

* * *

You tell about the problem issuing on AMD, but did you try with other GPUs ? Are you sure it’s hardware related ?

---

<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 17, 2024, 10:31am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/4 "2024-12-17T10:31:14Z")

</div>

See my answer here, it’s a problem with the file itself:

> [@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…

This PR will fix it:

> <https://github.com/BabylonJS/Assets/pull/87>
>
> See https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/…3

[EDIT] I’m putting the PR on hold, as I noticed that the PG works in Firefox, so it could be a bug with Chrome. I’ve asked Dawn’s devs and I’m waiting for their answer.

---

<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 17, 2024, 10:41am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/5 "2024-12-17T10:41:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![Yee7i](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yee7i/32/44277_2.png) [@Yee7i](https://forum.babylonjs.com/u/Yee7i)\
**Post date:** [December 17, 2024, 10:41am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/6 "2024-12-17T10:41:46Z")

</div>

On my work computers it seems to be working fine, so I assumed since they all run Nvidia it could be possibly hardware related.

---

<div class="post-metadata">

**Author:** ![Tricotou](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tricotou/32/5844_2.png) [@Tricotou](https://forum.babylonjs.com/u/Tricotou)\
**Post date:** [December 17, 2024, 10:44am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/7 "2024-12-17T10:44:01Z")

</div>

> [@Playground for WebGPU not working](https://forum.babylonjs.com/t/playground-for-webgpu-not-working/47297/7):
>
> It seems the `roof.jpg` file is invalid in some way (maybe the header?): just opening and resaving it in [Paint.net](http://Paint.net) makes it work…

I had a quick look, I would say more than coming from the request header, it might come from the EXIF of the file which contains tons of Photoshop CS2 stuff (2005 ^^)

 ![Screenshot from 2024-12-17 11-39-00](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/0/60b0317a4c519a8e4997823630c2754f4bce3715.png)

---

<div class="post-metadata">

**Author:** ![Yee7i](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yee7i/32/44277_2.png) [@Yee7i](https://forum.babylonjs.com/u/Yee7i)\
**Post date:** [December 17, 2024, 11:30am UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/8 "2024-12-17T11:30:04Z")

</div>

I can add that most textures from our work databases load empty as long as WebGPU is present in the project in Chromium browsers. Firefox doesn’t have that issue because WebGPU isn’t present there yet. So it’s not an issue with the texture of the roof itself, it’s more of a global issue.

---

<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 17, 2024, 12:29pm UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/9 "2024-12-17T12:29:18Z")

</div>

Note that when I said I tested in Firefox, I really tested in Firefox nightly, which has support for WebGPU.

---

<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 18, 2024, 8:23pm UTC](https://forum.babylonjs.com/t/loading-black-textures-in-webgpu-on-amd/55420/10 "2024-12-18T20:23:55Z")

</div>

An issue has been created for Chromium about this:

[https://issues.chromium.org/issues/384858956](https://issues.chromium.org/issues/384858956)
