glTF roughness texture significantly too smooth

materials
#1

Hi I’m trying to render a gltf file in the gltf loader example but the roughness channel of my metalRoughness texture is not rendering properly, it is way too smooth. The rendering is fine in other renderers as seen in this image. Is there something I’m missing? Some parameter I need to set?

Thank you.

#2

I found it has something to do with the RGBEEncoding being set on the hdr environment map in the example. For some reason that causes the roughness of the material to go all crazy. Setting the encoding to LinearEncoding gives correct roughness, but then the lighting isn’t correct.