فهرست منبع

update compositingAlphaMode (#23827)

sunag 3 سال پیش
والد
کامیت
36706f6ada
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      examples/jsm/renderers/webgpu/WebGPURenderer.js

+ 2 - 1
examples/jsm/renderers/webgpu/WebGPURenderer.js

@@ -172,7 +172,7 @@ class WebGPURenderer {
 		context.configure( {
 			device: device,
 			format: GPUTextureFormat.BGRA8Unorm, // this is the only valid context format right now (r121)
-			compositingAlphaMode: 'opaque'
+			compositingAlphaMode: 'premultiplied'
 		} );
 
 		this._adapter = adapter;
@@ -957,6 +957,7 @@ class WebGPURenderer {
 				device: device,
 				format: GPUTextureFormat.BGRA8Unorm,
 				usage: GPUTextureUsage.RENDER_ATTACHMENT,
+				compositingAlphaMode: 'premultiplied',
 				size: {
 					width: Math.floor( this._width * this._pixelRatio ),
 					height: Math.floor( this._height * this._pixelRatio ),