WebGPU: RG11B10UFloat and RGB9E5UFloat not implemented

Hello. I notice RG11B10UFloat and RGB9E5UFloat are added to WebGPUConstants.TextureFormat but not implemented in WebGPUTextureHelper.GetWebGPUTextureFormat. Currently they cannot be used as texture type on WebGPU, although it’s supported by spec.

Possible fix:

case Constants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:
    throw "TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV format not supported in WebGPU";
case Constants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:
    throw "TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV format not supported in WebGPU";

could be

case Constants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:
    return WebGPUConstants.TextureFormat.RG11B10UFloat;
case Constants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:
    return WebGPUConstants.TextureFormat.RGB9E5UFloat;

optionally with extra checks as in case Constants.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV.

Note RGB9E5UFloat is not renderable in WebGPU, so WebGPUConstants.TextureUsage.RenderAttachment needs to be turned off in WebGPUTextureHelper.createTexture

Demo with the fix: https://playground.babylonjs.com/?webgpu#XU9ZFH

Thanks for the report, here’s the PR that will add the support: