mkeeter / fidget

blazing fast implicit surface evaluation
Mozilla Public License 2.0
127 stars 11 forks source link

2D SDF artifacts #123

Closed virtualritz closed 5 months ago

virtualritz commented 5 months ago

The SDF preview looked smooth before but now I get tile-like artifacts and curvy stuff looking jagged:

I dunno when this (visual) regression got introduced since I didn't play with fidget for a month or more though.

image

mkeeter commented 5 months ago

This is intentional (#102), to make rendering cheaper. The boundary is still pixel-perfect, but regions that have been proved empty / full are drawn using interpolation from the corners, instead of checking every single pixel. SdfPixelRenderModel still implements the previous behavior.

virtualritz commented 5 months ago

Would you accept a PR that adds the old mode as 2D SDF (Precise) to the Config menu?

mkeeter commented 5 months ago

Sure, that would be fine!