`texture.textureFormat` does not return right value

Here, format should be R (which is RGBA)

The texture was loaded with a format of TEXTUREFORMAT_R.
The texture load itself only loads the red channel. However, the property for texture.textureFormat has a value of -1.

In the callback of _createTextureBase, when the texture data is uploaded to the GPU, it is using the correct format value.

it looks like the format of the InternalTexture is not being initialized, so it keeps defaulting to -1.

cc @ryantrem

Will take a look after a different bug!

Looks like a bug to me. I have a draft PR out to fix it, but need some feedback from area experts. Store the requested texture format in InternalTexture by ryantrem · Pull Request #15051 · BabylonJS/Babylon.js (github.com)

1 Like

This PR has now been merged, thanks for bringing this bug to our attention!


Thanks a lot!

1 Like