Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A Possible Bug in the Texture Coordinates Prediction Implementation #1117

@shunski

Description

@shunski

I believe that the fallback part of the texture coordinates prediction is not implemented in the way it should be.
In this file, it seems to me that the line 258:

if (next_data_id < data_id) {

should be:

else if (next_data_id < data_id) {

Otherwise, the fallback prediction at the line 256:

data_offset = prev_data_id * kNumComponents;

will ALWAYS be overwritten by the if-else blocks that follow, and as a consequence, the prediction will fallback to the zero prediction even if it can fallback to the delta coding with previous vertex.
This issue would not break meshes at all (as prediction functions could really be anything as long as they are consistent throughout encoding and decoding), but it will certainly reduce the compression efficiency for some meshes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions