engine icon indicating copy to clipboard operation
engine copied to clipboard

Material specularity behaves incorrectly (breaking KHR_materials_specular)

Open aidinabedi opened this issue 1 year ago • 0 comments

It seems that the specularityFactor property in a StandardMaterial incorrectly affects diffuse, when useMetalnessSpecularColor = true. This issue is most apparent when loading a glTF that relies on the KHR_materials_specular extension. If the glTF has "specularFactor": 0, the diffuse color is ignored in the engine, which it shouldn't.

See the attached Sphere.glb viewed in the official glTF viewer (expected result) compared to PlayCanvas glTF viewer (actual result):

Image

Image

This issue exists in both the latest 2.x and 1.x versions of the PlayCanvas engine.

aidinabedi avatar Jan 21 '25 13:01 aidinabedi