Browse Source

WebGPUTextureUtils: Fix `rgb9e5ufloat ` usage and `rg11b10ufloat` constant value. (#31698)

* WebGPUTextureUtils: Fix `RGB9E5UFloat` usage.

* Fix `rg11b10ufloat` constant value.
Michael Herzog 4 months ago
parent
commit
955946ef3b

+ 1 - 1
src/renderers/webgpu/utils/WebGPUConstants.js

@@ -113,7 +113,7 @@ export const GPUTextureFormat = {
 	// Packed 32-bit formats
 	RGB9E5UFloat: 'rgb9e5ufloat',
 	RGB10A2Unorm: 'rgb10a2unorm',
-	RG11B10UFloat: 'rgb10a2unorm',
+	RG11B10UFloat: 'rg11b10ufloat',
 
 	// 64-bit formats
 

+ 1 - 1
src/renderers/webgpu/utils/WebGPUTextureUtils.js

@@ -231,7 +231,7 @@ class WebGPUTextureUtils {
 
 		}
 
-		if ( texture.isCompressedTexture !== true && texture.isCompressedArrayTexture !== true ) {
+		if ( texture.isCompressedTexture !== true && texture.isCompressedArrayTexture !== true && format !== GPUTextureFormat.RGB9E5UFloat ) {
 
 			usage |= GPUTextureUsage.RENDER_ATTACHMENT;
 

粤ICP备19079148号