瀏覽代碼

WebGPUBindings: Clean up. (#21779)

Michael Herzog 4 年之前
父節點
當前提交
7b6ddb8ba8
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      examples/jsm/renderers/webgpu/WebGPUBindings.js

+ 3 - 4
examples/jsm/renderers/webgpu/WebGPUBindings.js

@@ -23,16 +23,15 @@ class WebGPUBindings {
 
 		if ( data === undefined ) {
 
-			const renderPipelines = this.renderPipelines.get( object );
-
-			// each material defines an array of bindings (ubos, textures, samplers etc.)
+			// each object defines an array of bindings (ubos, textures, samplers etc.)
 
 			const nodeBuilder = this.nodes.get( object );
-
 			const bindings = nodeBuilder.getBindings();
 
 			// setup (static) binding layout and (dynamic) binding group
 
+			const renderPipelines = this.renderPipelines.get( object );
+
 			const bindLayout = renderPipelines.pipeline.getBindGroupLayout( 0 );
 			const bindGroup = this._createBindGroup( bindings, bindLayout );