added in vertex start positions to address gltf file with mixed indic… - #256
Conversation
…ies/no indicies primitives
|
I don't see that the new added parameter is used anywhere in GLTF loader. How is this supposed to work? |
It would be used in here PBR/src/GLTF_PBR_Renderer.cpp. I can see if the org would let me link the GLTF file. The resource was made in cinema 4d which exported a valid GLTF file that contained primitives with Indices keys and some without. Since the PBR/src/GLTF_PBR_Renderer.cpp assumed a global start position, the primitives that came after with no indices key would have the incorrect vertices from the buffer. Also to add it never failed to load it would just be rendered incorrectly. |
|
exported_text_scene (9) 1 (1).zip Here is the file that didn't render properly. |
| const Uint32 FirstIndex; | ||
| const Uint32 IndexCount; | ||
| const Uint32 VertexCount; | ||
| const Uint32 VertexStart; |
There was a problem hiding this comment.
I suggest naming the variable FirstVertex to make it consistent with FirstIndex.
Also, add it before the VertexCount to make the ordering consistent as well.
| IndexStart, | ||
| IndexCount, | ||
| VertexCount, | ||
| VertexStart, |
There was a problem hiding this comment.
Since for indexed primitives, start vertex is baked into the index buffer, I suggest setting it to zero to avoid confusion.
There was a problem hiding this comment.
added a line for this
42660fe
into
DiligentGraphics:development
added in vertex start positions to address GLTF files with mixed indices/no indices primitives. This is part of the loading issue. The other part will be in DiligentFX.