瀏覽代碼

WebGPURenderPipelines: Clean up.

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

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

@@ -146,7 +146,7 @@ class WebGPURenderPipelines {
 			// pipeline
 
 			const primitiveTopology = this._getPrimitiveTopology( object );
-			const rasterizationState = this._getRasterizationStateDescriptor( object );
+			const rasterizationState = this._getRasterizationStateDescriptor( material );
 			const depthCompare = this._getDepthCompare( material );
 			const colorWriteMask = this._getColorWriteMask( material );
 
@@ -532,10 +532,9 @@ class WebGPURenderPipelines {
 
 	}
 
-	_getRasterizationStateDescriptor( object ) {
+	_getRasterizationStateDescriptor( material ) {
 
 		const descriptor = {};
-		const material = object.material;
 
 		switch ( material.side ) {