-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Double Precision documentation.
Fixed deleting Graphs if there is no other 2d graphics. Significantly reduced the number of mesh position updates when `fix_precision_enabled` is active.
- Loading branch information
1 parent
39b8310
commit fa564b0
Showing
12 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Double Precision | ||
|
||
[Godot Docs - Large world coordinates](https://docs.godotengine.org/en/latest/tutorials/physics/large_world_coordinates.html) | ||
|
||
This library supports building with `precision=double`, but does not provide pre-compiled binaries, as does Godot itself. | ||
|
||
Before building with double precision, it is recommended to read the [Build](Build.md) tips. | ||
|
||
## Compilation flags | ||
|
||
By default, you can simply run scons with the desired platform and the `precision=double` flag: | ||
|
||
```python | ||
scons platform=windows target=editor arch=x86_64 precision=double | ||
``` | ||
|
||
But there are also a few additional flags that can affect the visual representation of meshes. | ||
|
||
@note | ||
The videos were captured at the position `Vector3(16_000_000, 0, 0)`. | ||
|
||
### `fix_precision_enabled=yes|no` (default: yes) | ||
|
||
This flag enables a hack that moves the centers of all multimesh to the camera position if the camera has moved too far away. If this flag is disabled, then all meshes will always be drawn relative to the center of the world. | ||
|
||
Enabling or disabling the `fix_precision_enabled` flag only affects if `precision=double` is enabled. | ||
|
||
![fix_precision_enabled](images/fix_precision_enabled.webp) | ||
|
||
### `shader_world_coords_enabled=yes|no` (default: yes) | ||
|
||
This flag changes how meshes using world coordinates will be displayed. This category includes all volumetric objects. Wireframe meshes are not affected by this flag. | ||
|
||
`shader_world_coords_enabled` flag can be toggled independently of `precision=double`. | ||
|
||
![shader_world_coords_enabled](images/shader_world_coords_enabled.webp) | ||
|
||
But enabling world coordinates allows normalization of volumetric meshes within `float` precision. | ||
|
||
![shader_world_coords_enabled_origin](images/shader_world_coords_enabled_origin.png) | ||
|
||
## Examples | ||
|
||
```python | ||
# Disable world coordinates for shaders and enable position fix: | ||
scons platform=windows target=editor arch=x86_64 precision=double shader_world_coords_enabled=no fix_precision_enabled=yes | ||
|
||
# Leave the world coordinates enabled and disable the position fix:: | ||
scons platform=windows target=editor arch=x86_64 precision=double fix_precision_enabled=no | ||
``` |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters