PAIR-code / megaplot

Apache License 2.0
19 stars 5 forks source link

Revert `GeometricZoom` formula to original, set default to 1 #82

Open jimbojw opened 1 year ago

jimbojw commented 1 year ago

Currently, the GeometricZoom attribute, like all Sprite attributes, defaults to zero. To make this work, the formula used in the shader is this:

currentSizeWorld * exp(log(scale) * (1. - currentGeometricZoom))

Instead, the formula should match Benjamin Schmidt's original implementation:

currentSizeWorld * exp(log(scale) * currentGeometricZoom)

To do this, the GeometricZoom attribute needs to default to a value of 1, rather than 0. See #81