xeogl
xeogl copied to clipboard
GLTFModel does not set Texture encoding correctly for PBR materials
Textures loaded by GLTFModel should be sRGB when they are for PBR materials, and GLTFModel attempts to set the encoding
property as such, however that property is read only. Therefore, they are always linear
.
https://github.com/xeolabs/xeogl/blob/master/examples/js/models/glTFModel.js#L876
When I use "pbrMetallicRoughness" in my model.gltf, it shows this following error: Cannot set property encoding of #<Texture> which has only a getter. or TypeError: Attempted to assign to readonly property.
----------------model.gltf--------------------------------- "materials" : [ { "name" : "160802_mia337_001149_finalOBJ", "pbrMetallicRoughness" : { "baseColorFactor" : [ 0.6400000190734865, 0.6400000190734865, 0.6400000190734865, 1.0 ], "baseColorTexture" : { "index" : 0 }, "metallicFactor" : 0.0 } } ],
So I'm wondering that my issue is relevant of your notification. Can you give me some advice to fix it?