Open mvrhel opened 5 months ago
It would be helpful to revise the issue title to include: "has_multiple_normal clarification". I suspect the pseudo code may have issues. An outline to decode normals is:
if (first time)
{
read has_multiple_normal from binary stream
}
else
{
if (has_multiple_normal)
{
read is_reference from binary stream
}
else
{
get normal data...
}
}
It appears "...is added only if the current vertex is encountered for the first time" may be correct. Some further confirmation evidence is needed.
The pseudo code used to describe the storage of the normal_binary_data needs to be rewritten or some clarification needs to be added in the text. In particular this relates to the bit has_multiple_normal. The text below Table 171 states that "Bit has_multiple_normal is TRUE if the current vertex has many normals. This bit is added only if the current vertex is encountered for the first time." The psuedo code has at the beginning:
If (number_of_stored_normal == 0 || !has_multiple_normal) { Add has_multiple_normal in normal_binary_data ..... The rest of the pseudo code does not mention has_mutiple_normal.
So if the pseudo code is correct, the bit is added if the number of stored normals is zero OR if has_multiple_normal is FALSE. This does not line up with the text description below Table 171. It also means that has_multiple_normal is TRUE is only added if there are not any stored normals. This is very unclear.