If A and B are equal keys, then hash(A) and hash(B) should be equal, but
xatlas was violating this constraint.
This bug was not present in Thekla's original code, it was introduced
later by the xatlas project.
* Introduce AssetPipeline for performing glTF manipulations.
AssetPipeline offers a place for doing things like scene flattening,
transform baking, and optimization of glTF assets. These types of scene
manipulations will allow us to tackle lightmap baking in the upcoming
atlasgen tool.
This initial PR includes support for scene flattening, which is fairly
non-trivial. Support for parameterization via xatlas will be added in a
subsequent PR.
In a glTF asset, a single mesh can be referenced by several nodes, and
each reference can have a unique transform. AssetPipeline can flatten
the asset such that each instanced mesh has its own vertex data, and the
node transform gets baked into the vertex data.
Recall that gltfio is composed of two libraries: the core library (no
filamat) and the full library. This adds to the size of the full library
but leaves the core library as is.
* Fix various Windows build issues.
The new gltf_viewer app has an optional zero-arguments mode whereby it
loads a resgen-embedded binary model, which is useful for quick
sanity testing. If you don't specify an IBL, it loads a compressed
version of the pillars IBL.
This is used by our upcoming gltfio library and is the lightest-weight
glTF reader that we know of. In fact it does not do much other than
parse the JSON and provide C structures for the data.
Assimp's CalcTangentSpace deviates from de facto glTF 2.0 so we were
compensating for this with an unconditional fixup in MeshAssimp. However
the fixup should apply only when CalcTangentSpace is active, i.e. when
the model is missing tangents.
This makes it so that NormalTangentMirrorTest (has tangents) and
NormalTangentTest (needs tangents) both look reasonable.
I also noticed that MeshAssimp was inexplicably applying
aiProcess_CalcTangentSpace twice: once as a flag, and once as a
post-process. I removed the latter.
This will be fixed in the upcoming cgltf-based loader, which will
use our officially-sanctioned utility method in VertexBuffer.
See #528
This is a more complex test than suzanne because it has multiple
materials and exercises the named materials functionality in
loadFilamesh.
This also exercises our glTF-to-Filamesh pipeline at build time.
See issue #663
* Improve rendering to TextureView
UiHelper wasn't calling the resize callback at init time when attaching
to a TextureView, but it was for a SurfaceView. This makes both code
paths consistent and fixes the standard samples if they are modified to
render to a TextureView.
This change also adds a new sample app that shows how to render into
a TextureView.
* Suppress warning
* Suppress another warning
This also adds it as a dependency to filameshio. This does not seem to
increase the size of the WebGL build even though filameshio is a
dependency, perhaps because we are not using it yet.