MysticMods / Albedo

A mod for Minecraft to allow coloured lighting.
MIT License
10 stars 6 forks source link

High-distance precision loss due to using 32-bit floats #8

Open muzikbike opened 4 years ago

muzikbike commented 4 years ago

Should probably switch to using 64-bit floats to avoid this. Examples shown via Albedo Torches

Center of world: normal behaviour 2020-07-11_10 30 08

Beyond 2^23: snaps to corners 2020-07-11_10 30 25

Beyond 2^24: very obvious squares 2020-07-11_10 30 39

muzikbike commented 4 years ago

Some clearer examples with white light: 2020-07-11_14 46 54 2020-07-11_14 47 10 2020-07-11_14 47 23

muzikbike commented 4 years ago

A further selection of fun examples (some with https://github.com/ThisTestUser/FarLandsMod/):

Just before 16777216 on both axes 2020-07-11_14 48 25

Just before 33554432 on both axes 2020-07-11_15 06 31

Before 16777216, only one axis 2020-07-12_06 46 56

Before 33554432, only one axis 2020-07-12_06 47 32

Before 67108864, only one axis 2020-07-12_06 48 00

Examples of a torch placed at 1073741824 on both axes 2020-07-12_06 48 26 2020-07-12_06 48 52

536870912, one axis 2020-07-12_06 49 13