Page MenuHome

Fix T102923: Replace zero check with epsilons with UV Constrain to Bounds.
ClosedPublic

Authored by Chris Blackbourn (chrisbblend) on Dec 6 2022, 5:32 AM.

Details

Summary

Small roundoff errors during UV editing can sometimes occur, most likely due to so-called "catastrophic cancellation".

Here we set a tolerance around zero when using Constrain-To-Bounds and UV Scaling.

The tolerance is set at one quarter of a texel, on a 65536x65536 texture.

TODO: If this fix holds, we should formalize the tolerance into the UV editing subsystem, perhaps as a helper function, and investigate where else it needs to be applied.

Diff Detail

Repository
rB Blender

Event Timeline

Chris Blackbourn (chrisbblend) retitled this revision from Fix T102923: WIP to Fix T102923: Replace zero check with epsilons with UV Constrain to Bounds..
Campbell Barton (campbellbarton) added inline comments.
source/blender/editors/transform/transform_mode_resize.c
98

It would be good to include a description here of the case this resolves, with a reference to T102923.

98

Patch description would be better as a comment for this value: The tolerance is set at one quarter of a texel, on a 65536x65536 texture.

This revision is now accepted and ready to land.Dec 16 2022, 3:04 AM