Closed ffreyer closed 6 days ago
Attention: Patch coverage is 96.96970%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 77.08%. Comparing base (
d9a3602
) to head (a92967a
).
Files | Patch % | Lines |
---|---|---|
src/util.jl | 96.15% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
While trying to fix https://github.com/MakieOrg/Makie.jl/pull/3993 I noticed that you get an uninitialized normal (and probably position) when loading the cat mesh (test.obj here). This is due to the index remapping not working correctly. (As a reminder - object files can specify independent indices for positions, normals and texture coordinates within a vertex of a face. OpenGL only allows one index buffer, i.e. one index per vertex, so we need to combine vertex indices into a single unique index and reorder the position, normal and texture coordinate arrays accordingly.)
To fix this I just rewrote the remapping code with a
Dict
instead of whatever it was doing. That should make it faster and easier to understand/reason with. In the end this removes one position and normal from the cat mesh which should be that undefined first normal/position. I also added a short test for the remapping function.