KHR extensions on my app do not reflect the same results as with other glTF viewer apps

Hi all. I’ve been tinkering with KHR extensions for a couple weeks. I attach the code regarding to extensions of my glTF/glb and the way it looks on both my app and the glTF viewer from VSCode.

Is there any reason I’m missing on why the glTF looks black? I still get the light reflection, so I guess extensions work just fine. The version of Three on my app is r148.

Thanks for the help in advance.


Instead of adding a punctual light can you try it with an environment map instead? The usage of RoomEnvironment is also a good option for viewers. Below official examples demonstrate both approaches:

https://threejs.org/examples/#webgl_loader_gltf
https://threejs.org/examples/#webgl_loader_gltf_compressed

@Mugen87 environment map was what I was missing, thanks a lot! By RoomEnvironment do you mean Scene#environment property?

Yes. You can use RoomEnvironment in combination with PMREMGenerator to generate an environment for your scene.

1 Like

Example here:

1 Like