Skip to content

Commit

Permalink
Merge pull request #21443 from Mugen87/dev2
Browse files Browse the repository at this point in the history
WebGPURenderer: Fix rendering of line segments.
  • Loading branch information
Mugen87 authored Mar 10, 2021
2 parents 26aec21 + c6160b3 commit 12fdefa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/renderers/webgpu/WebGPURenderPipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class WebGPURenderPipelines {

let indexFormat;

if ( object.isLine ) {
if ( object.isLine === true && object.isLineSegments !== true ) {

const count = ( geometry.index ) ? geometry.index.count : geometry.attributes.position.count;

Expand Down Expand Up @@ -598,8 +598,8 @@ class WebGPURenderPipelines {

if ( object.isMesh ) return GPUPrimitiveTopology.TriangleList;
else if ( object.isPoints ) return GPUPrimitiveTopology.PointList;
else if ( object.isLine ) return GPUPrimitiveTopology.LineStrip;
else if ( object.isLineSegments ) return GPUPrimitiveTopology.LineList;
else if ( object.isLine ) return GPUPrimitiveTopology.LineStrip;

}

Expand Down

0 comments on commit 12fdefa

Please sign in to comment.