Skip to content

Commit

Permalink
WebGPURenderer: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Sep 26, 2020
1 parent f2822a8 commit 0576e70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/jsm/renderers/webgpu/WebGPUInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class WebGPUInfo {

}

update( object, count, instanceCount = 1 ) {
update( object, count, instanceCount ) {

this.render.drawCalls ++;

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/renderers/webgpu/WebGPURenderPipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class WebGPURenderPipelines {

const name = attribute.name;
const geometryAttribute = geometry.getAttribute( name );
const stepMode = geometryAttribute && geometryAttribute.isInstancedBufferAttribute ? GPUInputStepMode.Instance : GPUInputStepMode.Vertex;
const stepMode = ( geometryAttribute !== undefined && geometryAttribute.isInstancedBufferAttribute ) ? GPUInputStepMode.Instance : GPUInputStepMode.Vertex;

vertexBuffers.push( {
arrayStride: attribute.arrayStride,
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/renderers/webgpu/WebGPURenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ class WebGPURenderer {

const drawRange = geometry.drawRange;
const firstVertex = drawRange.start;
const instanceCount = geometry.instanceCount || 1;
const instanceCount = ( geometry.isInstancedBufferGeometry ) ? geometry.instanceCount : 1;

if ( hasIndex === true ) {

Expand Down

0 comments on commit 0576e70

Please sign in to comment.