diff --git a/Sources/IO/Geometry/GLTFImporter/Extensions.js b/Sources/IO/Geometry/GLTFImporter/Extensions.js index 3075fcc8187..6b85c6b4c6e 100644 --- a/Sources/IO/Geometry/GLTFImporter/Extensions.js +++ b/Sources/IO/Geometry/GLTFImporter/Extensions.js @@ -2,6 +2,7 @@ import macro from 'vtk.js/Sources/macros'; import * as vtkMath from 'vtk.js/Sources/Common/Core/Math'; import vtkDracoReader from 'vtk.js/Sources/IO/Geometry/DracoReader'; import vtkLight from 'vtk.js/Sources/Rendering/Core/Light'; +import vtkPolyDataNormals from 'vtk.js/Sources/Filters/Core/PolyDataNormals'; import { MIN_LIGHT_ATTENUATION } from 'vtk.js/Sources/IO/Geometry/GLTFImporter/Constants'; @@ -89,7 +90,10 @@ export function handleKHRLightsPunctual(extension, transformMatrix, model) { export async function handleKHRDracoMeshCompression(extension) { const reader = vtkDracoReader.newInstance(); reader.parse(extension.bufferView); - return reader.getOutputData(); + const pdn = vtkPolyDataNormals.newInstance(); + pdn.setInputConnection(reader.getOutputPort()); + pdn.setComputePointNormals(true); + return pdn.getOutputData(); } /**