GLTFSceneKit
GLTFSceneKit copied to clipboard
Seems Tangent vectors are being calculated and handled incorrectly
https://github.com/cx20/gltf-test
I've been running the tests found at that github project on the model viewer and it seems like the normal tangent test is failing
https://github.com/cx20/gltf-test/tree/master/tutorialModels/NormalTangentTest
we are supposed to get something like
this is from http://sandbox.babylonjs.com/
but we end up getting something like this.
the two "spheres" should be exactly the same, but they arent' I haven't looked into it too much, but it seems like the way the tangent vectors that are read from the GLB are being calculated incorrectly
Thank you for reporting! It used to be correct, but now it's wrong, it might be because of my workaround. And it seems that some calculations in the SceneKit shader was also changed around macOS 10.13.1. Anyway, it should be fixed.
its working on the newest version of iOS, can't check macOS because i can't update my computer yet but it seems like this isn't an issue after all :)
I checked the test model with macOS 10.13.2 beta 6 (17C85a), and it's not rendered correctly.
Front: looks flat
Back: looks opposite
sidebar update: https://emackey.github.io/testing-pbr/normal-tangent-readme.html here's a nice write up as to why this is important.
sadly I can't work on this until I can update my computer (not up to me) but i'll try to look into this as well and see what's going on
at least for iOS its working okay