Tested versions
- Reproducible in: 4.5.dev5
- Not reproducible in: 4.5.dev4
System information
Godot v4.5.dev5 - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Thu, 29 May 2025 21:42:00 +0000 on X11 - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - integrated Intel(R) Iris(R) Xe Graphics (RPL-P) - 13th Gen Intel(R) Core(TM) i9-13900H (20 threads)
Issue description
The new floating point serialization from #98750 has caused a few cases where numbers get serialized with unnecessary digits, causing git noise. Specifically, with shader uniforms (both global and local) and @export variables. It doesn't seem to affect the Environment resource.
Steps to reproduce
- Create a float global uniform in the project settings
- Set the value to something else, e.g. 0.02 or 1.2
- Create a script
- Add a float property with
@export_range(0, 2, 0.1) and a default value of 1
- Add a float property with
@export and a default value of 1
- Use the slider to change both values to 1.2
- In the .tscn, the first one will be 1.2000000000000002, and the second will be 1.1999999999970896
- Add a WorldEnvironment
- Change a value (for example, the tonemap exposure) to 1.2
- Check the .tscn file and see that it has been serialized as 1.2 without any unnecessary digits
Minimal reproduction project (MRP)
float_noise_test.zip
Tested versions
System information
Godot v4.5.dev5 - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Thu, 29 May 2025 21:42:00 +0000 on X11 - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - integrated Intel(R) Iris(R) Xe Graphics (RPL-P) - 13th Gen Intel(R) Core(TM) i9-13900H (20 threads)
Issue description
The new floating point serialization from #98750 has caused a few cases where numbers get serialized with unnecessary digits, causing git noise. Specifically, with shader uniforms (both global and local) and
@exportvariables. It doesn't seem to affect the Environment resource.Steps to reproduce
@export_range(0, 2, 0.1)and a default value of 1@exportand a default value of 1Minimal reproduction project (MRP)
float_noise_test.zip