RenderKit/openpgl

Invalid field with v0.7

Opened this issue · 1 comments

Hi,

We have updated OpenPGL to version 0.7. Overall, the update went smoothly, but I encountered an issue with the new version on a specific scene that was not present before.
After updating the Field with a batch of samples, the field becomes invalid, even though the sampleStorage itself is valid.

This scene contains some samples that are very far from the origin.
If I clamp the sample positions within [-100000, 100000], the field remains valid after the update.
However, what surprises me is that if I do not clamp the positions but instead call SetSceneBounds with [-100000, 100000], it does not fix the issue.

cheers,
Thomas

@tmetais thanks for reporting the issue.
I looked into it and found the problem, which was related to the integer arithmetic used when building the spatial structure for extreme large scenes.

Here is a fix for the problem, could you test it before we merge it into the devel branch?
/fix/empty-invalid-regions-on-first-fit

Cheers,

Sebastian