瀏覽代碼

WebGPURenderPipelines: Clean up.

Mugen87 4 年之前
父節點
當前提交
cf9822ca93
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/jsm/renderers/webgpu/WebGPURenderPipelines.js

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

@@ -145,6 +145,7 @@ class WebGPURenderPipelines {
 
 			const primitiveTopology = this._getPrimitiveTopology( object );
 			const rasterizationState = this._getRasterizationStateDescriptor( object );
+			const depthCompare = this._getDepthCompare( material );
 
 			pipeline = device.createRenderPipeline( {
 				layout: layout,
@@ -158,7 +159,7 @@ class WebGPURenderPipelines {
 				} ],
 				depthStencilState: {
 					depthWriteEnabled: material.depthWrite,
-					depthCompare: this._getDepthCompare( material ),
+					depthCompare: depthCompare,
 					format: GPUTextureFormat.Depth24PlusStencil8,
 				},
 				vertexState: {