Skip to content

Precision limit #38

@Silzinc

Description

@Silzinc

After trying to zoom on the fractal, after a certain level, it becomes impossible to drag the scene, and the fractal is just made of fat squares and rectangles. This is clearly caused by the limited precision of the f32 type. I found 2 solutions so far to enable a deeper zoom, although this problem will always comeback at a certain point:

  1. We can replace WGSL by GLSL which supports double precision floats. However, this won't be possible for now as bevy's GLSL does not support #import instructions yet. See https://github.com/bevyengine/bevy/blob/main/assets/shaders/custom_material.frag.
  2. Scale everything up. Currently, the screen shows a small part of the complex plane, and the distances we work with are never above 1 in order of magnitude. This is a waste of exponent bits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions