donmccurdy/glTF-Transform

Writing new glb removes clear coat

mpaleo opened this issue · 0 comments

So I'm trying to optimize textures (ktx) from a glb exported from Blender. I'm using babylon as render engine.
For some reason when I read and write the new optimized glb, it removes clear coat values.
At first I thought it was an issue with toktx but then I removed that portion and still no clear coat values in babylon.
Is there any config value missing ?

import {NodeIO} from '@gltf-transform/core'
import {toktx} from '@gltf-transform/cli'

export const optimizeGLB = async (buffer) => {
  const io = new NodeIO()

  const document = await io.readBinary(buffer)

  // await document.transform(
  //   toktx({ mode: 'etc1s', quality: 155 }),
  // )

  return io.writeBinary(document)
}