Merge pull request #71801 from akien-mga/codespell-en-GB-to-en-US

Convert en_GB spelling to en_US with codespell
This commit is contained in:
Rémi Verschelde 2023-01-23 11:08:55 +01:00
commit 1891d9fdf1
No known key found for this signature in database
GPG Key ID: C3336907360768E1
79 changed files with 146 additions and 145 deletions

View File

@ -404,7 +404,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
#### Shaders #### Shaders
- Removed `SCREEN_TEXTURE` and `DEPTH_TEXTURE` in favour of uniform hints `hint_screen_texture` and `hint_depth_texture`. - Removed `SCREEN_TEXTURE` and `DEPTH_TEXTURE` in favor of uniform hints `hint_screen_texture` and `hint_depth_texture`.
### Fixed ### Fixed

View File

@ -44,7 +44,7 @@ typedef uint32_t uintr_t;
#endif #endif
/** /**
* Miscellaneous helpers for marshalling data types, and encoding * Miscellaneous helpers for marshaling data types, and encoding
* in an endian independent way * in an endian independent way
*/ */

View File

@ -106,11 +106,11 @@ void AStar3D::remove_point(int64_t p_id) {
bool p_exists = points.lookup(p_id, p); bool p_exists = points.lookup(p_id, p);
ERR_FAIL_COND_MSG(!p_exists, vformat("Can't remove point. Point with id: %d doesn't exist.", p_id)); ERR_FAIL_COND_MSG(!p_exists, vformat("Can't remove point. Point with id: %d doesn't exist.", p_id));
for (OAHashMap<int64_t, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) { for (OAHashMap<int64_t, Point *>::Iterator it = p->neighbors.iter(); it.valid; it = p->neighbors.next_iter(it)) {
Segment s(p_id, (*it.key)); Segment s(p_id, (*it.key));
segments.erase(s); segments.erase(s);
(*it.value)->neighbours.remove(p->id); (*it.value)->neighbors.remove(p->id);
(*it.value)->unlinked_neighbours.remove(p->id); (*it.value)->unlinked_neighbours.remove(p->id);
} }
@ -118,7 +118,7 @@ void AStar3D::remove_point(int64_t p_id) {
Segment s(p_id, (*it.key)); Segment s(p_id, (*it.key));
segments.erase(s); segments.erase(s);
(*it.value)->neighbours.remove(p->id); (*it.value)->neighbors.remove(p->id);
(*it.value)->unlinked_neighbours.remove(p->id); (*it.value)->unlinked_neighbours.remove(p->id);
} }
@ -138,10 +138,10 @@ void AStar3D::connect_points(int64_t p_id, int64_t p_with_id, bool bidirectional
bool to_exists = points.lookup(p_with_id, b); bool to_exists = points.lookup(p_with_id, b);
ERR_FAIL_COND_MSG(!to_exists, vformat("Can't connect points. Point with id: %d doesn't exist.", p_with_id)); ERR_FAIL_COND_MSG(!to_exists, vformat("Can't connect points. Point with id: %d doesn't exist.", p_with_id));
a->neighbours.set(b->id, b); a->neighbors.set(b->id, b);
if (bidirectional) { if (bidirectional) {
b->neighbours.set(a->id, a); b->neighbors.set(a->id, a);
} else { } else {
b->unlinked_neighbours.set(a->id, a); b->unlinked_neighbours.set(a->id, a);
} }
@ -155,7 +155,7 @@ void AStar3D::connect_points(int64_t p_id, int64_t p_with_id, bool bidirectional
if (element) { if (element) {
s.direction |= element->direction; s.direction |= element->direction;
if (s.direction == Segment::BIDIRECTIONAL) { if (s.direction == Segment::BIDIRECTIONAL) {
// Both are neighbours of each other now // Both are neighbors of each other now
a->unlinked_neighbours.remove(b->id); a->unlinked_neighbours.remove(b->id);
b->unlinked_neighbours.remove(a->id); b->unlinked_neighbours.remove(a->id);
} }
@ -183,9 +183,9 @@ void AStar3D::disconnect_points(int64_t p_id, int64_t p_with_id, bool bidirectio
// Erase the directions to be removed // Erase the directions to be removed
s.direction = (element->direction & ~remove_direction); s.direction = (element->direction & ~remove_direction);
a->neighbours.remove(b->id); a->neighbors.remove(b->id);
if (bidirectional) { if (bidirectional) {
b->neighbours.remove(a->id); b->neighbors.remove(a->id);
if (element->direction != Segment::BIDIRECTIONAL) { if (element->direction != Segment::BIDIRECTIONAL) {
a->unlinked_neighbours.remove(b->id); a->unlinked_neighbours.remove(b->id);
b->unlinked_neighbours.remove(a->id); b->unlinked_neighbours.remove(a->id);
@ -226,7 +226,7 @@ Vector<int64_t> AStar3D::get_point_connections(int64_t p_id) {
Vector<int64_t> point_list; Vector<int64_t> point_list;
for (OAHashMap<int64_t, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) { for (OAHashMap<int64_t, Point *>::Iterator it = p->neighbors.iter(); it.valid; it = p->neighbors.next_iter(it)) {
point_list.push_back((*it.key)); point_list.push_back((*it.key));
} }
@ -346,8 +346,8 @@ bool AStar3D::_solve(Point *begin_point, Point *end_point) {
open_list.remove_at(open_list.size() - 1); open_list.remove_at(open_list.size() - 1);
p->closed_pass = pass; // Mark the point as closed p->closed_pass = pass; // Mark the point as closed
for (OAHashMap<int64_t, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) { for (OAHashMap<int64_t, Point *>::Iterator it = p->neighbors.iter(); it.valid; it = p->neighbors.next_iter(it)) {
Point *e = *(it.value); // The neighbour point Point *e = *(it.value); // The neighbor point
if (!e->enabled || e->closed_pass == pass) { if (!e->enabled || e->closed_pass == pass) {
continue; continue;
@ -813,8 +813,8 @@ bool AStar2D::_solve(AStar3D::Point *begin_point, AStar3D::Point *end_point) {
open_list.remove_at(open_list.size() - 1); open_list.remove_at(open_list.size() - 1);
p->closed_pass = astar.pass; // Mark the point as closed. p->closed_pass = astar.pass; // Mark the point as closed.
for (OAHashMap<int64_t, AStar3D::Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) { for (OAHashMap<int64_t, AStar3D::Point *>::Iterator it = p->neighbors.iter(); it.valid; it = p->neighbors.next_iter(it)) {
AStar3D::Point *e = *(it.value); // The neighbour point. AStar3D::Point *e = *(it.value); // The neighbor point.
if (!e->enabled || e->closed_pass == astar.pass) { if (!e->enabled || e->closed_pass == astar.pass) {
continue; continue;

View File

@ -52,7 +52,7 @@ class AStar3D : public RefCounted {
real_t weight_scale = 0; real_t weight_scale = 0;
bool enabled = false; bool enabled = false;
OAHashMap<int64_t, Point *> neighbours = 4u; OAHashMap<int64_t, Point *> neighbors = 4u;
OAHashMap<int64_t, Point *> unlinked_neighbours = 4u; OAHashMap<int64_t, Point *> unlinked_neighbours = 4u;
// Used for pathfinding. // Used for pathfinding.

View File

@ -401,7 +401,7 @@ bool AStarGrid2D::_solve(Point *p_begin_point, Point *p_end_point) {
List<Point *> nbors; List<Point *> nbors;
_get_nbors(p, nbors); _get_nbors(p, nbors);
for (List<Point *>::Element *E = nbors.front(); E; E = E->next()) { for (List<Point *>::Element *E = nbors.front(); E; E = E->next()) {
Point *e = E->get(); // The neighbour point. Point *e = E->get(); // The neighbor point.
real_t weight_scale = 1.0; real_t weight_scale = 1.0;
if (jumping_enabled) { if (jumping_enabled) {

View File

@ -87,7 +87,7 @@ struct BVH_ABB {
return -neg_max - min; return -neg_max - min;
} }
POINT calculate_centre() const { POINT calculate_center() const {
return POINT((calculate_size() * 0.5) + min); return POINT((calculate_size() * 0.5) + min);
} }

View File

@ -25,7 +25,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
return; return;
} }
POINT centre = full_bound.calculate_centre(); POINT center = full_bound.calculate_center();
POINT size = full_bound.calculate_size(); POINT size = full_bound.calculate_size();
int order[POINT::AXIS_COUNT]; int order[POINT::AXIS_COUNT];
@ -43,7 +43,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
for (int a = 0; a < num_a; a++) { for (int a = 0; a < num_a; a++) {
uint32_t ind = group_a[a]; uint32_t ind = group_a[a];
if (temp_bounds[ind].min.coord[split_axis] > centre.coord[split_axis]) { if (temp_bounds[ind].min.coord[split_axis] > center.coord[split_axis]) {
// add to b // add to b
group_b[num_b++] = ind; group_b[num_b++] = ind;
@ -75,7 +75,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
for (int a = 0; a < num_a; a++) { for (int a = 0; a < num_a; a++) {
uint32_t ind = group_a[a]; uint32_t ind = group_a[a];
if (temp_bounds[ind].min.coord[split_axis] > centre.coord[split_axis]) { if (temp_bounds[ind].min.coord[split_axis] > center.coord[split_axis]) {
count++; count++;
} }
} }
@ -100,7 +100,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
for (int a = 0; a < num_a; a++) { for (int a = 0; a < num_a; a++) {
uint32_t ind = group_a[a]; uint32_t ind = group_a[a];
if (temp_bounds[ind].min.coord[split_axis] > centre.coord[split_axis]) { if (temp_bounds[ind].min.coord[split_axis] > center.coord[split_axis]) {
// add to b // add to b
group_b[num_b++] = ind; group_b[num_b++] = ind;

View File

@ -194,7 +194,7 @@ void Color::set_hsv(float p_h, float p_s, float p_v, float p_alpha) {
a = p_alpha; a = p_alpha;
if (p_s == 0.0f) { if (p_s == 0.0f) {
// Achromatic (grey) // Achromatic (gray)
r = g = b = p_v; r = g = b = p_v;
return; return;
} }

View File

@ -53,7 +53,7 @@
<return type="void" /> <return type="void" />
<param index="0" name="button" type="Control" /> <param index="0" name="button" type="Control" />
<description> <description>
Removes the [param button] from the dialog. Does NOT free the [param button]. The [param button] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [param button] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals. Removes the [param button] from the dialog. Does NOT free the [param button]. The [param button] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [param button] will no longer emit this dialog's [signal custom_action] or [signal canceled] signals.
</description> </description>
</method> </method>
</methods> </methods>
@ -81,7 +81,7 @@
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" overrides="Window" default="true" /> <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" overrides="Window" default="true" />
</members> </members>
<signals> <signals>
<signal name="cancelled"> <signal name="canceled">
<description> <description>
Emitted when the dialog is closed or the button created with [method add_cancel_button] is pressed. Emitted when the dialog is closed or the button created with [method add_cancel_button] is pressed.
</description> </description>

View File

@ -104,7 +104,7 @@
</member> </member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)"> <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code]. The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D] or [constant Animation.TYPE_SCALE_3D] the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_position], [method get_root_motion_rotation], [method get_root_motion_scale] and [RootMotionView]. If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D] or [constant Animation.TYPE_SCALE_3D] the transformation will be canceled visually, and the animation will appear to stay in place. See also [method get_root_motion_position], [method get_root_motion_rotation], [method get_root_motion_scale] and [RootMotionView].
</member> </member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root"> <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
The root animation node of this [AnimationTree]. See [AnimationNode]. The root animation node of this [AnimationTree]. See [AnimationNode].

View File

@ -24,7 +24,7 @@
<param index="3" name="pitch_scale" type="float" default="1.0" /> <param index="3" name="pitch_scale" type="float" default="1.0" />
<description> <description>
Play an [AudioStream] at a given offset, volume and pitch scale. Playback starts immediately. Play an [AudioStream] at a given offset, volume and pitch scale. Playback starts immediately.
The return value is an unique integer ID that is associated to this playback stream and which can be used to controll it. The return value is an unique integer ID that is associated to this playback stream and which can be used to control it.
This ID becomes invalid when the stream ends (if it does not loop), when the [AudioStreamPlaybackPolyphonic] is stopped, or when [method stop_stream] is called. This ID becomes invalid when the stream ends (if it does not loop), when the [AudioStreamPlaybackPolyphonic] is stopped, or when [method stop_stream] is called.
This function returns [constant INVALID_ID] if the amount of streams currently playing equals [member AudioStreamPolyphonic.polyphony]. If you need a higher amount of maximum polyphony, raise this value. This function returns [constant INVALID_ID] if the amount of streams currently playing equals [member AudioStreamPolyphonic.polyphony]. If you need a higher amount of maximum polyphony, raise this value.
</description> </description>

View File

@ -101,7 +101,7 @@
<return type="Color" /> <return type="Color" />
<param index="0" name="over" type="Color" /> <param index="0" name="over" type="Color" />
<description> <description>
Returns a new color resulting from overlaying this color over the given color. In a painting program, you can imagine it as the [param over] color painted over this colour (including alpha). Returns a new color resulting from overlaying this color over the given color. In a painting program, you can imagine it as the [param over] color painted over this color (including alpha).
[codeblocks] [codeblocks]
[gdscript] [gdscript]
var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%

View File

@ -8,10 +8,10 @@
To get cancel action, you can use: To get cancel action, you can use:
[codeblocks] [codeblocks]
[gdscript] [gdscript]
get_cancel_button().pressed.connect(self.cancelled) get_cancel_button().pressed.connect(self.canceled)
[/gdscript] [/gdscript]
[csharp] [csharp]
GetCancelButton().Pressed += Cancelled; GetCancelButton().Pressed += Canceled;
[/csharp] [/csharp]
[/codeblocks] [/codeblocks]
</description> </description>

View File

@ -198,7 +198,7 @@
<param index="1" name="tolerance_length" type="float" default="0.2" /> <param index="1" name="tolerance_length" type="float" default="0.2" />
<description> <description>
Returns a list of points along the curve, with almost uniform density. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! Returns a list of points along the curve, with almost uniform density. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
[param tolerance_length] controls the maximal distance between two neighbouring points, before the segment has to be subdivided. [param tolerance_length] controls the maximal distance between two neighboring points, before the segment has to be subdivided.
</description> </description>
</method> </method>
</methods> </methods>

View File

@ -80,7 +80,7 @@
A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens. A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens.
</member> </member>
<member name="light_intensity_lux" type="float" setter="set_param" getter="get_param"> <member name="light_intensity_lux" type="float" setter="set_param" getter="get_param">
Used by [DirectionalLight3D]s when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lux. Lux is a measure pf luminous flux per unit area, it is equal to one lumen per square metre. Lux is the measure of how much light hits a surface at a given time. Used by [DirectionalLight3D]s when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lux. Lux is a measure of luminous flux per unit area, it is equal to one lumen per square meter. Lux is the measure of how much light hits a surface at a given time.
On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux. On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux.
</member> </member>
<member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false"> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="Marshalls" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <class name="Marshalls" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description> <brief_description>
Data transformation (marshalling) and encoding helpers. Data transformation (marshaling) and encoding helpers.
</brief_description> </brief_description>
<description> <description>
Provides data transformation and encoding utility functions. Provides data transformation and encoding utility functions.

View File

@ -566,7 +566,7 @@
<method name="open_midi_inputs"> <method name="open_midi_inputs">
<return type="void" /> <return type="void" />
<description> <description>
Initialises the singleton for the system MIDI driver. Initializes the singleton for the system MIDI driver.
[b]Note:[/b] This method is implemented on Linux, macOS and Windows. [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description> </description>
</method> </method>

View File

@ -883,7 +883,7 @@
<param index="0" name="name" type="StringName" /> <param index="0" name="name" type="StringName" />
<param index="1" name="value" type="Variant" /> <param index="1" name="value" type="Variant" />
<description> <description>
Adds or changes the entry [param name] inside the object's metadata. The metadata [param value] can be any [Variant], although some types cannot be serialised correctly. Adds or changes the entry [param name] inside the object's metadata. The metadata [param value] can be any [Variant], although some types cannot be serialized correctly.
If [param value] is [code]null[/code], the entry is removed. This is the equivalent of using [method remove_meta]. See also [method has_meta] and [method get_meta]. If [param value] is [code]null[/code], the entry is removed. This is the equivalent of using [method remove_meta]. See also [method has_meta] and [method get_meta].
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited. [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited.
</description> </description>

View File

@ -385,7 +385,7 @@
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an [code]assert[/code] call always evaluates to true. When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an [code]assert[/code] call always evaluates to true.
</member> </member>
<member name="debug/gdscript/warnings/confusable_identifier" type="int" setter="" getter="" default="1"> <member name="debug/gdscript/warnings/confusable_identifier" type="int" setter="" getter="" default="1">
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an indentifier contains characters that can be confused with something else, like when mixing different alphabets. When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an identifier contains characters that can be confused with something else, like when mixing different alphabets.
</member> </member>
<member name="debug/gdscript/warnings/constant_used_as_function" type="int" setter="" getter="" default="1"> <member name="debug/gdscript/warnings/constant_used_as_function" type="int" setter="" getter="" default="1">
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a constant is used as a function. When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a constant is used as a function.

View File

@ -696,7 +696,7 @@
<method name="merge_overlapping_carets"> <method name="merge_overlapping_carets">
<return type="void" /> <return type="void" />
<description> <description>
Merges any overlapping carets. Will favour the newest caret, or the caret with a selection. Merges any overlapping carets. Will favor the newest caret, or the caret with a selection.
[b]Note:[/b] This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap. [b]Note:[/b] This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap.
</description> </description>
</method> </method>

View File

@ -589,7 +589,7 @@
<param index="0" name="terrain_set" type="int" /> <param index="0" name="terrain_set" type="int" />
<param index="1" name="mode" type="int" enum="TileSet.TerrainMode" /> <param index="1" name="mode" type="int" enum="TileSet.TerrainMode" />
<description> <description>
Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighbouring tiles' terrains. Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains.
</description> </description>
</method> </method>
</methods> </methods>

View File

@ -632,7 +632,7 @@ void AudioDriverCoreAudio::_set_device(const String &device, bool capture) {
ERR_FAIL_COND(result != noErr); ERR_FAIL_COND(result != noErr);
if (capture) { if (capture) {
// Reset audio input to keep synchronisation. // Reset audio input to keep synchronization.
input_position = 0; input_position = 0;
input_size = 0; input_size = 0;
} }

View File

@ -264,7 +264,7 @@ Error AudioDriverPulseAudio::init_device() {
samples_in.resize(buffer_frames * channels); samples_in.resize(buffer_frames * channels);
samples_out.resize(pa_buffer_size); samples_out.resize(pa_buffer_size);
// Reset audio input to keep synchronisation. // Reset audio input to keep synchronization.
input_position = 0; input_position = 0;
input_size = 0; input_size = 0;

View File

@ -2252,7 +2252,7 @@ Error VulkanContext::swap_buffers() {
// simple that it doesn't do either of those. // simple that it doesn't do either of those.
} }
#endif #endif
// Wait for the image acquired semaphore to be signalled to ensure // Wait for the image acquired semaphore to be signaled to ensure
// that the image won't be rendered to until the presentation // that the image won't be rendered to until the presentation
// engine has fully released ownership to the application, and it is // engine has fully released ownership to the application, and it is
// okay to render to the image. // okay to render to the image.
@ -2304,7 +2304,7 @@ Error VulkanContext::swap_buffers() {
if (separate_present_queue) { if (separate_present_queue) {
// If we are using separate queues, change image ownership to the // If we are using separate queues, change image ownership to the
// present queue before presenting, waiting for the draw complete // present queue before presenting, waiting for the draw complete
// semaphore and signalling the ownership released semaphore when finished. // semaphore and signaling the ownership released semaphore when finished.
VkFence nullFence = VK_NULL_HANDLE; VkFence nullFence = VK_NULL_HANDLE;
pipe_stage_flags[0] = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; pipe_stage_flags[0] = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
submit_info.waitSemaphoreCount = 1; submit_info.waitSemaphoreCount = 1;

View File

@ -268,7 +268,7 @@ void EditorPropertyTextEnum::_custom_value_accepted() {
_custom_value_submitted(new_value); _custom_value_submitted(new_value);
} }
void EditorPropertyTextEnum::_custom_value_cancelled() { void EditorPropertyTextEnum::_custom_value_canceled() {
custom_value_edit->set_text(get_edited_object()->get(get_edited_property())); custom_value_edit->set_text(get_edited_object()->get(get_edited_property()));
edit_custom_layout->hide(); edit_custom_layout->hide();
@ -380,7 +380,7 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
cancel_button = memnew(Button); cancel_button = memnew(Button);
cancel_button->set_flat(true); cancel_button->set_flat(true);
edit_custom_layout->add_child(cancel_button); edit_custom_layout->add_child(cancel_button);
cancel_button->connect("pressed", callable_mp(this, &EditorPropertyTextEnum::_custom_value_cancelled)); cancel_button->connect("pressed", callable_mp(this, &EditorPropertyTextEnum::_custom_value_canceled));
add_focusable(option_button); add_focusable(option_button);
add_focusable(edit_button); add_focusable(edit_button);

View File

@ -121,7 +121,7 @@ class EditorPropertyTextEnum : public EditorProperty {
void _edit_custom_value(); void _edit_custom_value();
void _custom_value_submitted(String p_value); void _custom_value_submitted(String p_value);
void _custom_value_accepted(); void _custom_value_accepted();
void _custom_value_cancelled(); void _custom_value_canceled();
protected: protected:
virtual void _set_read_only(bool p_read_only) override; virtual void _set_read_only(bool p_read_only) override;

View File

@ -734,7 +734,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p
/* CREATE PRIMITIVE ARRAY */ /* CREATE PRIMITIVE ARRAY */
/**************************/ /**************************/
// The way collada uses indices is more optimal, and friendlier with 3D modelling software, // The way collada uses indices is more optimal, and friendlier with 3D modeling software,
// because it can index everything, not only vertices (similar to how the WII works). // because it can index everything, not only vertices (similar to how the WII works).
// This is, however, more incompatible with standard video cards, so arrays must be converted. // This is, however, more incompatible with standard video cards, so arrays must be converted.
// Must convert to GL/DX format. // Must convert to GL/DX format.

View File

@ -169,7 +169,7 @@ void InputEventConfigurationDialog::_on_listen_input_changed(const Ref<InputEven
} }
if (k.is_valid()) { if (k.is_valid()) {
k->set_pressed(false); // To avoid serialisation of 'pressed' property - doesn't matter for actions anyway. k->set_pressed(false); // To avoid serialization of 'pressed' property - doesn't matter for actions anyway.
// Maintain physical keycode option state // Maintain physical keycode option state
if (physical_key_checkbox->is_pressed()) { if (physical_key_checkbox->is_pressed()) {
k->set_keycode(Key::NONE); k->set_keycode(Key::NONE);

View File

@ -92,7 +92,7 @@ void PluginConfigDialog::_on_confirmed() {
_clear_fields(); _clear_fields();
} }
void PluginConfigDialog::_on_cancelled() { void PluginConfigDialog::_on_canceled() {
_clear_fields(); _clear_fields();
} }
@ -162,7 +162,7 @@ void PluginConfigDialog::_notification(int p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &PluginConfigDialog::_on_confirmed)); connect("confirmed", callable_mp(this, &PluginConfigDialog::_on_confirmed));
get_cancel_button()->connect("pressed", callable_mp(this, &PluginConfigDialog::_on_cancelled)); get_cancel_button()->connect("pressed", callable_mp(this, &PluginConfigDialog::_on_canceled));
} break; } break;
} }
} }

View File

@ -58,7 +58,7 @@ class PluginConfigDialog : public ConfirmationDialog {
void _clear_fields(); void _clear_fields();
void _on_confirmed(); void _on_confirmed();
void _on_cancelled(); void _on_canceled();
void _on_language_changed(const int p_language); void _on_language_changed(const int p_language);
void _on_required_text_changed(const String &p_text); void _on_required_text_changed(const String &p_text);
String _get_subfolder(); String _get_subfolder();

View File

@ -5929,7 +5929,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_it
EditorNode::get_singleton()->get_gui_base()->add_child(selector); EditorNode::get_singleton()->get_gui_base()->add_child(selector);
selector->set_title(TTR("Change Default Type")); selector->set_title(TTR("Change Default Type"));
selector->connect("confirmed", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_confirmed)); selector->connect("confirmed", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_confirmed));
selector->connect("cancelled", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_closed)); selector->connect("canceled", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_closed));
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);
selector->add_child(vbc); selector->add_child(vbc);

View File

@ -454,7 +454,7 @@ void GradientEditor::_notification(int p_what) {
// Draw with selection color. // Draw with selection color.
draw_rect(Rect2(button_offset, 0, h, h), points[grabbed].color); draw_rect(Rect2(button_offset, 0, h, h), points[grabbed].color);
} else { } else {
// If no color selected draw grey color with 'X' on top. // If no color selected draw gray color with 'X' on top.
draw_rect(Rect2(button_offset, 0, h, h), Color(0.5, 0.5, 0.5, 1)); draw_rect(Rect2(button_offset, 0, h, h), Color(0.5, 0.5, 0.5, 1));
draw_line(Vector2(button_offset, 0), Vector2(button_offset + h, h), Color(1, 1, 1, 0.6)); draw_line(Vector2(button_offset, 0), Vector2(button_offset + h, h), Color(1, 1, 1, 0.6));
draw_line(Vector2(button_offset, h), Vector2(button_offset + h, 0), Color(1, 1, 1, 0.6)); draw_line(Vector2(button_offset, h), Vector2(button_offset + h, 0), Color(1, 1, 1, 0.6));

View File

@ -1254,7 +1254,7 @@ Polygon2DEditor::Polygon2DEditor() {
uv_edit = memnew(AcceptDialog); uv_edit = memnew(AcceptDialog);
add_child(uv_edit); add_child(uv_edit);
uv_edit->set_title(TTR("Polygon 2D UV Editor")); uv_edit->set_title(TTR("Polygon 2D UV Editor"));
uv_edit->connect("cancelled", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide)); uv_edit->connect("canceled", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide));
VBoxContainer *uv_main_vb = memnew(VBoxContainer); VBoxContainer *uv_main_vb = memnew(VBoxContainer);
uv_edit->add_child(uv_main_vb); uv_edit->add_child(uv_main_vb);

View File

@ -5186,7 +5186,7 @@ VisualShaderEditor::VisualShaderEditor() {
members_dialog->set_ok_button_text(TTR("Create")); members_dialog->set_ok_button_text(TTR("Create"));
members_dialog->get_ok_button()->connect("pressed", callable_mp(this, &VisualShaderEditor::_member_create)); members_dialog->get_ok_button()->connect("pressed", callable_mp(this, &VisualShaderEditor::_member_create));
members_dialog->get_ok_button()->set_disabled(true); members_dialog->get_ok_button()->set_disabled(true);
members_dialog->connect("cancelled", callable_mp(this, &VisualShaderEditor::_member_cancel)); members_dialog->connect("canceled", callable_mp(this, &VisualShaderEditor::_member_cancel));
add_child(members_dialog); add_child(members_dialog);
// add varyings dialog // add varyings dialog

View File

@ -195,7 +195,7 @@ void ProgressDialog::add_task(const String &p_task, const String &p_label, int p
cancel_hb->hide(); cancel_hb->hide();
} }
cancel_hb->move_to_front(); cancel_hb->move_to_front();
cancelled = false; canceled = false;
_popup(); _popup();
if (p_can_cancel) { if (p_can_cancel) {
cancel->grab_focus(); cancel->grab_focus();
@ -203,12 +203,12 @@ void ProgressDialog::add_task(const String &p_task, const String &p_label, int p
} }
bool ProgressDialog::task_step(const String &p_task, const String &p_state, int p_step, bool p_force_redraw) { bool ProgressDialog::task_step(const String &p_task, const String &p_state, int p_step, bool p_force_redraw) {
ERR_FAIL_COND_V(!tasks.has(p_task), cancelled); ERR_FAIL_COND_V(!tasks.has(p_task), canceled);
if (!p_force_redraw) { if (!p_force_redraw) {
uint64_t tus = OS::get_singleton()->get_ticks_usec(); uint64_t tus = OS::get_singleton()->get_ticks_usec();
if (tus - last_progress_tick < 200000) { //200ms if (tus - last_progress_tick < 200000) { //200ms
return cancelled; return canceled;
} }
} }
@ -228,7 +228,7 @@ bool ProgressDialog::task_step(const String &p_task, const String &p_state, int
#ifndef ANDROID_ENABLED #ifndef ANDROID_ENABLED
Main::iteration(); // this will not work on a lot of platforms, so it's only meant for the editor Main::iteration(); // this will not work on a lot of platforms, so it's only meant for the editor
#endif #endif
return cancelled; return canceled;
} }
void ProgressDialog::end_task(const String &p_task) { void ProgressDialog::end_task(const String &p_task) {
@ -246,7 +246,7 @@ void ProgressDialog::end_task(const String &p_task) {
} }
void ProgressDialog::_cancel_pressed() { void ProgressDialog::_cancel_pressed() {
cancelled = true; canceled = true;
} }
void ProgressDialog::_bind_methods() { void ProgressDialog::_bind_methods() {

View File

@ -85,7 +85,7 @@ class ProgressDialog : public PopupPanel {
void _popup(); void _popup();
void _cancel_pressed(); void _cancel_pressed();
bool cancelled = false; bool canceled = false;
protected: protected:
void _notification(int p_what); void _notification(int p_what);

View File

@ -1285,6 +1285,7 @@ static const char *gdscript_signals_renames[][2] = {
// {"changed","settings_changed"}, // EditorSettings // {"changed","settings_changed"}, // EditorSettings
{ "about_to_show", "about_to_popup" }, // Popup { "about_to_show", "about_to_popup" }, // Popup
{ "button_release", "button_released" }, // XRController3D { "button_release", "button_released" }, // XRController3D
{ "cancelled", "canceled" }, // AcceptDialog
{ "network_peer_connected", "peer_connected" }, // MultiplayerAPI { "network_peer_connected", "peer_connected" }, // MultiplayerAPI
{ "network_peer_disconnected", "peer_disconnected" }, // MultiplayerAPI { "network_peer_disconnected", "peer_disconnected" }, // MultiplayerAPI
{ "network_peer_packet", "peer_packet" }, // MultiplayerAPI { "network_peer_packet", "peer_packet" }, // MultiplayerAPI

View File

@ -2007,13 +2007,13 @@ void SceneTreeDock::_shader_created(Ref<Shader> p_shader) {
void SceneTreeDock::_script_creation_closed() { void SceneTreeDock::_script_creation_closed() {
script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created)); script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
script_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->disconnect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
} }
void SceneTreeDock::_shader_creation_closed() { void SceneTreeDock::_shader_creation_closed() {
shader_create_dialog->disconnect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created)); shader_create_dialog->disconnect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created));
shader_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
shader_create_dialog->disconnect("cancelled", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
} }
void SceneTreeDock::_toggle_editable_children_from_selection() { void SceneTreeDock::_toggle_editable_children_from_selection() {
@ -3093,7 +3093,7 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created)); script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
script_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->set_inheritance_base_type("Node"); script_create_dialog->set_inheritance_base_type("Node");
script_create_dialog->config(inherits, path); script_create_dialog->config(inherits, path);
script_create_dialog->popup_centered(); script_create_dialog->popup_centered();
@ -3135,7 +3135,7 @@ void SceneTreeDock::attach_shader_to_selected(int p_preferred_mode) {
shader_create_dialog->connect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created)); shader_create_dialog->connect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created));
shader_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
shader_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
shader_create_dialog->config(path, true, true, -1, p_preferred_mode); shader_create_dialog->config(path, true, true, -1, p_preferred_mode);
shader_create_dialog->popup_centered(); shader_create_dialog->popup_centered();
} }

View File

@ -677,7 +677,7 @@ bool SceneTreeEditor::_item_matches_all_terms(TreeItem *p_item, PackedStringArra
for (int i = 0; i < p_terms.size(); i++) { for (int i = 0; i < p_terms.size(); i++) {
String term = p_terms[i]; String term = p_terms[i];
// Recognise special filter. // Recognize special filter.
if (term.contains(":") && !term.get_slicec(':', 0).is_empty()) { if (term.contains(":") && !term.get_slicec(':', 0).is_empty()) {
String parameter = term.get_slicec(':', 0); String parameter = term.get_slicec(':', 0);
String argument = term.get_slicec(':', 1); String argument = term.get_slicec(':', 1);

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
SKIP_LIST="./.git,./bin,./thirdparty,*.gen.*,*.po,*.pot,package-lock.json,./core/string/locales.h,./DONORS.md,./misc/dist/linux/org.godotengine.Godot.desktop,./misc/scripts/codespell.sh" SKIP_LIST="./.*,./bin,.platform/web/node_modules,./platform/android/java/lib/src/com,./thirdparty,*.gen.*,*.po,*.pot,*.rc,package-lock.json,./core/string/locales.h,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md,./misc/dist/linux/org.godotengine.Godot.desktop,./misc/scripts/codespell.sh"
IGNORE_LIST="alo,ba,childs,complies,curvelinear,doubleclick,expct,fave,findn,gird,gud,inout,lod,nd,numer,ois,readded,ro,sav,statics,te,varius,varn,wan" IGNORE_LIST="alo,ba,childs,complies,curvelinear,doubleclick,expct,fave,findn,gird,gud,inout,lod,nd,numer,ois,readded,ro,sav,statics,te,varius,varn,wan"
codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" --builtin "clear,rare,en-GB_to_en-US"

View File

@ -797,7 +797,7 @@ namespace Godot
{ {
if (saturation == 0) if (saturation == 0)
{ {
// Achromatic (grey) // Achromatic (gray)
return new Color(value, value, value, alpha); return new Color(value, value, value, alpha);
} }

View File

@ -172,7 +172,7 @@ ReplicationEditor::ReplicationEditor() {
set_custom_minimum_size(Size2(0, 200) * EDSCALE); set_custom_minimum_size(Size2(0, 200) * EDSCALE);
delete_dialog = memnew(ConfirmationDialog); delete_dialog = memnew(ConfirmationDialog);
delete_dialog->connect("cancelled", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(false)); delete_dialog->connect("canceled", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(false));
delete_dialog->connect("confirmed", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(true)); delete_dialog->connect("confirmed", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(true));
add_child(delete_dialog); add_child(delete_dialog);

View File

@ -125,7 +125,7 @@ void SceneReplicationInterface::on_reset() {
} }
void SceneReplicationInterface::on_network_process() { void SceneReplicationInterface::on_network_process() {
// Prevent endless stalling in case of unforseen spawn errors. // Prevent endless stalling in case of unforeseen spawn errors.
if (spawn_queue.size()) { if (spawn_queue.size()) {
ERR_PRINT("An error happened during last spawn, this usually means the 'ready' signal was not emitted by the spawned node."); ERR_PRINT("An error happened during last spawn, this usually means the 'ready' signal was not emitted by the spawned node.");
for (const ObjectID &oid : spawn_queue) { for (const ObjectID &oid : spawn_queue) {

View File

@ -225,7 +225,7 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
avp.entry = new_entry; avp.entry = new_entry;
} }
} else { } else {
// Add the neighbour polygon to the reachable ones. // Add the neighbor polygon to the reachable ones.
gd::NavigationPoly new_navigation_poly = gd::NavigationPoly(connection.polygon); gd::NavigationPoly new_navigation_poly = gd::NavigationPoly(connection.polygon);
new_navigation_poly.self_id = navigation_polys.size(); new_navigation_poly.self_id = navigation_polys.size();
new_navigation_poly.back_navigation_poly_id = least_cost_id; new_navigation_poly.back_navigation_poly_id = least_cost_id;
@ -236,7 +236,7 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
new_navigation_poly.entry = new_entry; new_navigation_poly.entry = new_entry;
navigation_polys.push_back(new_navigation_poly); navigation_polys.push_back(new_navigation_poly);
// Add the neighbour polygon to the polygons to visit. // Add the neighbor polygon to the polygons to visit.
to_visit.push_back(navigation_polys.size() - 1); to_visit.push_back(navigation_polys.size() - 1);
} }
} }

View File

@ -5,7 +5,7 @@
</brief_description> </brief_description>
<description> <description>
This resource defines an OpenXR action. Actions can be used both for inputs (buttons/joystick/trigger/etc) and outputs (haptics). This resource defines an OpenXR action. Actions can be used both for inputs (buttons/joystick/trigger/etc) and outputs (haptics).
OpenXR performs automatic conversion between action type and input type whenever possible. An analogue trigger bound to a boolean action will thus return [code]false[/code] if the trigger is depressed and [code]true[/code] if pressed fully. OpenXR performs automatic conversion between action type and input type whenever possible. An analog trigger bound to a boolean action will thus return [code]false[/code] if the trigger is depressed and [code]true[/code] if pressed fully.
Actions are not directly bound to specific devices, instead OpenXR recognizes a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the [url=https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved]reserved path section in the OpenXR specification[/url] for more info on the top level paths. Actions are not directly bound to specific devices, instead OpenXR recognizes a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the [url=https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved]reserved path section in the OpenXR specification[/url] for more info on the top level paths.
Note that the name of the resource is used to register the action with. Note that the name of the resource is used to register the action with.
</description> </description>
@ -27,7 +27,7 @@
This action provides a boolean value. This action provides a boolean value.
</constant> </constant>
<constant name="OPENXR_ACTION_FLOAT" value="1" enum="ActionType"> <constant name="OPENXR_ACTION_FLOAT" value="1" enum="ActionType">
This action provides a float value between [code]0.0[/code] and [code]1.0[/code] for any analogue input such as triggers. This action provides a float value between [code]0.0[/code] and [code]1.0[/code] for any analog input such as triggers.
</constant> </constant>
<constant name="OPENXR_ACTION_VECTOR2" value="2" enum="ActionType"> <constant name="OPENXR_ACTION_VECTOR2" value="2" enum="ActionType">
This action provides a vector2 value and can be bound to embedded trackpads and joysticks This action provides a vector2 value and can be bound to embedded trackpads and joysticks

View File

@ -751,7 +751,7 @@ bool OpenXRAPI::create_swapchains() {
Also Godot only creates a swapchain for the main output. Also Godot only creates a swapchain for the main output.
OpenXR will require us to create swapchains as the render target for additional viewports if we want to use the layer system OpenXR will require us to create swapchains as the render target for additional viewports if we want to use the layer system
to optimise text rendering and background rendering as OpenXR may choose to re-use the results for reprojection while we're to optimize text rendering and background rendering as OpenXR may choose to re-use the results for reprojection while we're
already rendering the next frame. already rendering the next frame.
Finally an area we need to expand upon is that Foveated rendering is only enabled for the swap chain we create, Finally an area we need to expand upon is that Foveated rendering is only enabled for the swap chain we create,

View File

@ -53,7 +53,7 @@
#include "util.h" #include "util.h"
// Note, OpenXR code that we wrote for our plugin makes use of C++20 notation for initialising structs which ensures zeroing out unspecified members. // Note, OpenXR code that we wrote for our plugin makes use of C++20 notation for initializing structs which ensures zeroing out unspecified members.
// Godot is currently restricted to C++17 which doesn't allow this notation. Make sure critical fields are set. // Godot is currently restricted to C++17 which doesn't allow this notation. Make sure critical fields are set.
// forward declarations, we don't want to include these fully // forward declarations, we don't want to include these fully

View File

@ -70,7 +70,7 @@ static void _editor_init() {
// Only add our OpenXR action map editor if OpenXR is enabled for our project // Only add our OpenXR action map editor if OpenXR is enabled for our project
if (openxr_interaction_profile_meta_data == nullptr) { if (openxr_interaction_profile_meta_data == nullptr) {
// If we didn't initialize our actionmap meta data at startup, we initialise it now. // If we didn't initialize our actionmap meta data at startup, we initialize it now.
openxr_interaction_profile_meta_data = memnew(OpenXRInteractionProfileMetaData); openxr_interaction_profile_meta_data = memnew(OpenXRInteractionProfileMetaData);
ERR_FAIL_NULL(openxr_interaction_profile_meta_data); ERR_FAIL_NULL(openxr_interaction_profile_meta_data);
} }
@ -85,7 +85,7 @@ static void _editor_init() {
void initialize_openxr_module(ModuleInitializationLevel p_level) { void initialize_openxr_module(ModuleInitializationLevel p_level) {
if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) {
if (OpenXRAPI::openxr_is_enabled(false)) { if (OpenXRAPI::openxr_is_enabled(false)) {
// Always register our extension wrappers even if we don't initialise OpenXR. // Always register our extension wrappers even if we don't initialize OpenXR.
// Some of these wrappers will add functionality to our editor. // Some of these wrappers will add functionality to our editor.
#ifdef ANDROID_ENABLED #ifdef ANDROID_ENABLED
OpenXRAPI::register_extension_wrapper(memnew(OpenXRAndroidExtension)); OpenXRAPI::register_extension_wrapper(memnew(OpenXRAndroidExtension));

View File

@ -48,7 +48,7 @@
<string name="state_failed_unlicensed">Download failed because you may not have purchased this app</string> <string name="state_failed_unlicensed">Download failed because you may not have purchased this app</string>
<string name="state_failed_fetching_url">Download failed because the resources could not be found</string> <string name="state_failed_fetching_url">Download failed because the resources could not be found</string>
<string name="state_failed_sdcard_full">Download failed because the external storage is full</string> <string name="state_failed_sdcard_full">Download failed because the external storage is full</string>
<string name="state_failed_cancelled">Download cancelled</string> <string name="state_failed_cancelled">Download canceled</string>
<string name="state_failed">Download failed</string> <string name="state_failed">Download failed</string>
<string name="kilobytes_per_second">%1$s KB/s</string> <string name="kilobytes_per_second">%1$s KB/s</string>

View File

@ -120,7 +120,7 @@ public final class ProcessPhoenix extends Activity {
/** /**
* Checks if the current process is a temporary Phoenix Process. * Checks if the current process is a temporary Phoenix Process.
* This can be used to avoid initialisation of unused resources or to prevent running code that * This can be used to avoid initialization of unused resources or to prevent running code that
* is not multi-process ready. * is not multi-process ready.
* *
* @return true if the current process is a temporary Phoenix Process * @return true if the current process is a temporary Phoenix Process

View File

@ -113,7 +113,7 @@ public:
void touch_press(int p_idx, int p_x, int p_y, bool p_pressed, bool p_double_click); void touch_press(int p_idx, int p_x, int p_y, bool p_pressed, bool p_double_click);
void touch_drag(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_y, float p_pressure, Vector2 p_tilt); void touch_drag(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_y, float p_pressure, Vector2 p_tilt);
void touches_cancelled(int p_idx); void touches_canceled(int p_idx);
// MARK: Keyboard // MARK: Keyboard

View File

@ -225,7 +225,7 @@ void DisplayServerIOS::perform_event(const Ref<InputEvent> &p_event) {
Input::get_singleton()->parse_input_event(p_event); Input::get_singleton()->parse_input_event(p_event);
} }
void DisplayServerIOS::touches_cancelled(int p_idx) { void DisplayServerIOS::touches_canceled(int p_idx) {
touch_press(p_idx, -1, -1, false, false); touch_press(p_idx, -1, -1, false, false);
} }

View File

@ -397,7 +397,7 @@ static const float earth_gravity = 9.80665;
UITouch *touch = [tlist objectAtIndex:i]; UITouch *touch = [tlist objectAtIndex:i];
int tid = [self getTouchIDForTouch:touch]; int tid = [self getTouchIDForTouch:touch];
ERR_FAIL_COND(tid == -1); ERR_FAIL_COND(tid == -1);
DisplayServerIOS::get_singleton()->touches_cancelled(tid); DisplayServerIOS::get_singleton()->touches_canceled(tid);
} }
} }
[self clearTouches]; [self clearTouches];

View File

@ -271,7 +271,7 @@ def configure(env: "Environment"):
env.Append(LIBS=["miniupnpc"]) env.Append(LIBS=["miniupnpc"])
# On Linux wchar_t should be 32-bits # On Linux wchar_t should be 32-bits
# 16-bit library shouldn't be required due to compiler optimisations # 16-bit library shouldn't be required due to compiler optimizations
if not env["builtin_pcre2"]: if not env["builtin_pcre2"]:
env.ParseConfig("pkg-config libpcre2-32 --cflags --libs") env.ParseConfig("pkg-config libpcre2-32 --cflags --libs")

View File

@ -2568,7 +2568,7 @@ HashMap<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_fill_path(int p_lay
} }
} }
} }
ERR_FAIL_COND_V_MSG(found_bit == TileSet::CELL_NEIGHBOR_MAX, output, vformat("Invalid terrain path, %s is not a neighbouring tile of %s", p_path[i + 1], p_path[i])); ERR_FAIL_COND_V_MSG(found_bit == TileSet::CELL_NEIGHBOR_MAX, output, vformat("Invalid terrain path, %s is not a neighboring tile of %s", p_path[i + 1], p_path[i]));
neighbor_list.push_back(found_bit); neighbor_list.push_back(found_bit);
} }
@ -3220,7 +3220,7 @@ Vector2i TileMap::local_to_map(const Vector2 &p_local_position) const {
ret = ret.floor(); ret = ret.floor();
} }
// Compute the tile offset, and if we might the output for a neighbour top tile // Compute the tile offset, and if we might the output for a neighbor top tile
Vector2 in_tile_pos = raw_pos - ret; Vector2 in_tile_pos = raw_pos - ret;
bool in_top_left_triangle = (in_tile_pos - Vector2(0.5, 0.0)).cross(Vector2(-0.5, 1.0 / overlapping_ratio - 1)) <= 0; bool in_top_left_triangle = (in_tile_pos - Vector2(0.5, 0.0)).cross(Vector2(-0.5, 1.0 / overlapping_ratio - 1)) <= 0;
bool in_top_right_triangle = (in_tile_pos - Vector2(0.5, 0.0)).cross(Vector2(0.5, 1.0 / overlapping_ratio - 1)) > 0; bool in_top_right_triangle = (in_tile_pos - Vector2(0.5, 0.0)).cross(Vector2(0.5, 1.0 / overlapping_ratio - 1)) > 0;
@ -3284,7 +3284,7 @@ Vector2i TileMap::local_to_map(const Vector2 &p_local_position) const {
ret = ret.floor(); ret = ret.floor();
} }
// Compute the tile offset, and if we might the output for a neighbour top tile // Compute the tile offset, and if we might the output for a neighbor top tile
Vector2 in_tile_pos = raw_pos - ret; Vector2 in_tile_pos = raw_pos - ret;
bool in_top_left_triangle = (in_tile_pos - Vector2(0.0, 0.5)).cross(Vector2(1.0 / overlapping_ratio - 1, -0.5)) > 0; bool in_top_left_triangle = (in_tile_pos - Vector2(0.0, 0.5)).cross(Vector2(1.0 / overlapping_ratio - 1, -0.5)) > 0;
bool in_bottom_left_triangle = (in_tile_pos - Vector2(0.0, 0.5)).cross(Vector2(1.0 / overlapping_ratio - 1, 0.5)) <= 0; bool in_bottom_left_triangle = (in_tile_pos - Vector2(0.0, 0.5)).cross(Vector2(1.0 / overlapping_ratio - 1, 0.5)) <= 0;

View File

@ -839,7 +839,7 @@ void AudioStreamPlayer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_playing", "enable"), &AudioStreamPlayer3D::_set_playing); ClassDB::bind_method(D_METHOD("_set_playing", "enable"), &AudioStreamPlayer3D::_set_playing);
ClassDB::bind_method(D_METHOD("_is_active"), &AudioStreamPlayer3D::_is_active); ClassDB::bind_method(D_METHOD("_is_active"), &AudioStreamPlayer3D::_is_active);
ClassDB::bind_method(D_METHOD("set_max_distance", "metres"), &AudioStreamPlayer3D::set_max_distance); ClassDB::bind_method(D_METHOD("set_max_distance", "meters"), &AudioStreamPlayer3D::set_max_distance);
ClassDB::bind_method(D_METHOD("get_max_distance"), &AudioStreamPlayer3D::get_max_distance); ClassDB::bind_method(D_METHOD("get_max_distance"), &AudioStreamPlayer3D::get_max_distance);
ClassDB::bind_method(D_METHOD("set_area_mask", "mask"), &AudioStreamPlayer3D::set_area_mask); ClassDB::bind_method(D_METHOD("set_area_mask", "mask"), &AudioStreamPlayer3D::set_area_mask);

View File

@ -1346,7 +1346,7 @@ void CharacterBody3D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo
motion = motion.slide(up_direction); motion = motion.slide(up_direction);
result.travel = Vector3(); result.travel = Vector3();
} else { } else {
// Travel is too high to be safely cancelled, we take it into account. // Travel is too high to be safely canceled, we take it into account.
result.travel = result.travel.slide(up_direction); result.travel = result.travel.slide(up_direction);
motion = motion.normalized() * result.travel.length(); motion = motion.normalized() * result.travel.length();
} }
@ -1354,7 +1354,7 @@ void CharacterBody3D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo
// Determines if you are on the ground, and limits the possibility of climbing on the walls because of the approximations. // Determines if you are on the ground, and limits the possibility of climbing on the walls because of the approximations.
_snap_on_floor(true, false); _snap_on_floor(true, false);
} else { } else {
// If the movement is not cancelled we only keep the remaining. // If the movement is not canceled we only keep the remaining.
motion = result.remainder; motion = result.remainder;
} }

View File

@ -136,7 +136,7 @@ void AcceptDialog::_cancel_pressed() {
call_deferred(SNAME("hide")); call_deferred(SNAME("hide"));
emit_signal(SNAME("cancelled")); emit_signal(SNAME("canceled"));
cancel_pressed(); cancel_pressed();
@ -372,7 +372,7 @@ void AcceptDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_ok_button_text"), &AcceptDialog::get_ok_button_text); ClassDB::bind_method(D_METHOD("get_ok_button_text"), &AcceptDialog::get_ok_button_text);
ADD_SIGNAL(MethodInfo("confirmed")); ADD_SIGNAL(MethodInfo("confirmed"));
ADD_SIGNAL(MethodInfo("cancelled")); ADD_SIGNAL(MethodInfo("canceled"));
ADD_SIGNAL(MethodInfo("custom_action", PropertyInfo(Variant::STRING_NAME, "action"))); ADD_SIGNAL(MethodInfo("custom_action", PropertyInfo(Variant::STRING_NAME, "action")));
ADD_PROPERTY(PropertyInfo(Variant::STRING, "ok_button_text"), "set_ok_button_text", "get_ok_button_text"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "ok_button_text"), "set_ok_button_text", "get_ok_button_text");

View File

@ -2576,7 +2576,7 @@ LineEdit::LineEdit(const String &p_placeholder) {
set_placeholder(p_placeholder); set_placeholder(p_placeholder);
set_editable(true); // Initialise to opposite first, so we get past the early-out in set_editable. set_editable(true); // Initialize to opposite first, so we get past the early-out in set_editable.
} }
LineEdit::~LineEdit() { LineEdit::~LineEdit() {

View File

@ -274,7 +274,7 @@ private:
void _update_placeholder(); void _update_placeholder();
/* Initialise to opposite first, so we get past the early-out in set_editable. */ /* Initialize to opposite first, so we get past the early-out in set_editable. */
bool editable = false; bool editable = false;
TextDirection text_direction = TEXT_DIRECTION_AUTO; TextDirection text_direction = TEXT_DIRECTION_AUTO;

View File

@ -135,7 +135,7 @@ Error MultiplayerAPI::encode_and_compress_variant(const Variant &p_variant, uint
return err; return err;
} }
if (r_buffer) { if (r_buffer) {
// The first byte is not used by the marshalling, so store the type // The first byte is not used by the marshaling, so store the type
// so we know how to decompress and decode this variant. // so we know how to decompress and decode this variant.
r_buffer[0] = p_variant.get_type(); r_buffer[0] = p_variant.get_type();
} }

View File

@ -136,7 +136,7 @@ int AudioStreamPlaybackPolyphonic::mix(AudioFrame *p_buffer, float p_rate_scale,
continue; continue;
} }
float volume_db = s.volume_db; // Copy because it can be overriden at any time. float volume_db = s.volume_db; // Copy because it can be overridden at any time.
float next_volume = Math::db_to_linear(volume_db); float next_volume = Math::db_to_linear(volume_db);
s.prev_volume_db = volume_db; s.prev_volume_db = volume_db;

View File

@ -188,7 +188,7 @@ bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const {
if (shader.is_valid()) { if (shader.is_valid()) {
const StringName *sn = remap_cache.getptr(p_name); const StringName *sn = remap_cache.getptr(p_name);
if (sn) { if (sn) {
// Only return a parameter if it was previosly set. // Only return a parameter if it was previously set.
r_ret = get_shader_parameter(*sn); r_ret = get_shader_parameter(*sn);
return true; return true;
} }

View File

@ -325,7 +325,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector
} }
const Point &np = points[least_cost_point]; const Point &np = points[least_cost_point];
//open the neighbours for search //open the neighbors for search
for (const int &E : np.connections) { for (const int &E : np.connections) {
Point &p = points.write[E]; Point &p = points.write[E];
@ -339,7 +339,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector
p.distance = distance; p.distance = distance;
} }
} else { } else {
//add to open neighbours //add to open neighbors
p.prev = least_cost_point; p.prev = least_cost_point;
p.distance = distance; p.distance = distance;

View File

@ -56,7 +56,7 @@ vec4 screen_space_to_view_space_depth(vec4 p_depth) {
float depth_linearize_mul = params.z_near; float depth_linearize_mul = params.z_near;
float depth_linearize_add = params.z_far; float depth_linearize_add = params.z_far;
// Optimised version of "-cameraClipNear / (cameraClipFar - projDepth * (cameraClipFar - cameraClipNear)) * cameraClipFar" // Optimized version of "-cameraClipNear / (cameraClipFar - projDepth * (cameraClipFar - cameraClipNear)) * cameraClipFar"
// Set your depth_linearize_mul and depth_linearize_add to: // Set your depth_linearize_mul and depth_linearize_add to:
// depth_linearize_mul = ( cameraClipFar * cameraClipNear) / ( cameraClipFar - cameraClipNear ); // depth_linearize_mul = ( cameraClipFar * cameraClipNear) / ( cameraClipFar - cameraClipNear );

View File

@ -221,7 +221,7 @@ void SSAOTap(const int p_quality_level, inout float r_obscurance_sum, inout floa
// snap to pixel center (more correct obscurance math, avoids artifacts) // snap to pixel center (more correct obscurance math, avoids artifacts)
sample_offset = round(sample_offset); sample_offset = round(sample_offset);
// calculate MIP based on the sample distance from the centre, similar to as described // calculate MIP based on the sample distance from the center, similar to as described
// in http://graphics.cs.williams.edu/papers/SAOHPG12/. // in http://graphics.cs.williams.edu/papers/SAOHPG12/.
float mip_level = (p_quality_level < SSAO_DEPTH_MIPS_ENABLE_AT_QUALITY_PRESET) ? (0) : (sample_pow_2_len + p_mip_offset); float mip_level = (p_quality_level < SSAO_DEPTH_MIPS_ENABLE_AT_QUALITY_PRESET) ? (0) : (sample_pow_2_len + p_mip_offset);
@ -259,7 +259,7 @@ void generate_SSAO_shadows_internal(out float r_shadow_term, out vec4 r_edges, o
// get this pixel's viewspace depth // get this pixel's viewspace depth
pix_z = valuesUL.y; pix_z = valuesUL.y;
// get left right top bottom neighbouring pixels for edge detection (gets compiled out on quality_level == 0) // get left right top bottom neighboring pixels for edge detection (gets compiled out on quality_level == 0)
pix_left_z = valuesUL.x; pix_left_z = valuesUL.x;
pix_top_z = valuesUL.z; pix_top_z = valuesUL.z;
pix_right_z = valuesBR.z; pix_right_z = valuesBR.z;
@ -304,7 +304,7 @@ void generate_SSAO_shadows_internal(out float r_shadow_term, out vec4 r_edges, o
float obscurance_sum = 0.0; float obscurance_sum = 0.0;
float weight_sum = 0.0; float weight_sum = 0.0;
// edge mask for between this and left/right/top/bottom neighbour pixels - not used in quality level 0 so initialize to "no edge" (1 is no edge, 0 is edge) // edge mask for between this and left/right/top/bottom neighbor pixels - not used in quality level 0 so initialize to "no edge" (1 is no edge, 0 is edge)
vec4 edgesLRTB = vec4(1.0, 1.0, 1.0, 1.0); vec4 edgesLRTB = vec4(1.0, 1.0, 1.0, 1.0);
// Move center pixel slightly towards camera to avoid imprecision artifacts due to using of 16bit depth buffer; a lot smaller offsets needed when using 32bit floats // Move center pixel slightly towards camera to avoid imprecision artifacts due to using of 16bit depth buffer; a lot smaller offsets needed when using 32bit floats
@ -318,7 +318,7 @@ void generate_SSAO_shadows_internal(out float r_shadow_term, out vec4 r_edges, o
if (!p_adaptive_base && (p_quality_level >= SSAO_DETAIL_AO_ENABLE_AT_QUALITY_PRESET)) { if (!p_adaptive_base && (p_quality_level >= SSAO_DETAIL_AO_ENABLE_AT_QUALITY_PRESET)) {
// disable in case of quality level 4 (reference) // disable in case of quality level 4 (reference)
if (p_quality_level != 4) { if (p_quality_level != 4) {
//approximate neighbouring pixels positions (actually just deltas or "positions - pix_center_pos" ) //approximate neighboring pixels positions (actually just deltas or "positions - pix_center_pos" )
vec3 normalized_viewspace_dir = vec3(pix_center_pos.xy / pix_center_pos.zz, 1.0); vec3 normalized_viewspace_dir = vec3(pix_center_pos.xy / pix_center_pos.zz, 1.0);
vec3 pixel_left_delta = vec3(-pixel_size_at_center.x, 0.0, 0.0) + normalized_viewspace_dir * (pix_left_z - pix_center_pos.z); vec3 pixel_left_delta = vec3(-pixel_size_at_center.x, 0.0, 0.0) + normalized_viewspace_dir * (pix_left_z - pix_center_pos.z);
vec3 pixel_right_delta = vec3(+pixel_size_at_center.x, 0.0, 0.0) + normalized_viewspace_dir * (pix_right_z - pix_center_pos.z); vec3 pixel_right_delta = vec3(+pixel_size_at_center.x, 0.0, 0.0) + normalized_viewspace_dir * (pix_right_z - pix_center_pos.z);

View File

@ -80,7 +80,7 @@ void main() {
#ifdef PROCESS_MAPA #ifdef PROCESS_MAPA
vec2 uv = (vec2(ssC) + 0.5f) * params.half_screen_pixel_size * 2.0; vec2 uv = (vec2(ssC) + 0.5f) * params.half_screen_pixel_size * 2.0;
float centre = textureLod(source_importance, uv, 0.0).x; float center = textureLod(source_importance, uv, 0.0).x;
vec2 half_pixel = params.half_screen_pixel_size; vec2 half_pixel = params.half_screen_pixel_size;
@ -98,7 +98,7 @@ void main() {
#ifdef PROCESS_MAPB #ifdef PROCESS_MAPB
vec2 uv = (vec2(ssC) + 0.5f) * params.half_screen_pixel_size * 2.0; vec2 uv = (vec2(ssC) + 0.5f) * params.half_screen_pixel_size * 2.0;
float centre = textureLod(source_importance, uv, 0.0).x; float center = textureLod(source_importance, uv, 0.0).x;
vec2 half_pixel = params.half_screen_pixel_size; vec2 half_pixel = params.half_screen_pixel_size;

View File

@ -60,8 +60,8 @@ void main() {
int mx = int(pix_pos.x % 2); int mx = int(pix_pos.x % 2);
int my = int(pix_pos.y % 2); int my = int(pix_pos.y % 2);
int index_center = mx + my * 2; // center index int index_center = mx + my * 2; // center index
int index_horizontal = (1 - mx) + my * 2; // neighbouring, horizontal int index_horizontal = (1 - mx) + my * 2; // neighboring, horizontal
int index_vertical = mx + (1 - my) * 2; // neighbouring, vertical int index_vertical = mx + (1 - my) * 2; // neighboring, vertical
int index_diagonal = (1 - mx) + (1 - my) * 2; // diagonal int index_diagonal = (1 - mx) + (1 - my) * 2; // diagonal
vec2 center_val = texelFetch(source_texture, ivec3(pix_pos / uvec2(params.size_modifier), index_center), 0).xy; vec2 center_val = texelFetch(source_texture, ivec3(pix_pos / uvec2(params.size_modifier), index_center), 0).xy;

View File

@ -234,7 +234,7 @@ void SSILTap(const int p_quality_level, inout vec3 r_color_sum, inout float r_ob
// snap to pixel center (more correct obscurance math, avoids artifacts) // snap to pixel center (more correct obscurance math, avoids artifacts)
sample_offset = round(sample_offset); sample_offset = round(sample_offset);
// calculate MIP based on the sample distance from the centre, similar to as described // calculate MIP based on the sample distance from the center, similar to as described
// in http://graphics.cs.williams.edu/papers/SAOHPG12/. // in http://graphics.cs.williams.edu/papers/SAOHPG12/.
float mip_level = (p_quality_level < SSIL_DEPTH_MIPS_ENABLE_AT_QUALITY_PRESET) ? (0) : (sample_pow_2_len + p_mip_offset); float mip_level = (p_quality_level < SSIL_DEPTH_MIPS_ENABLE_AT_QUALITY_PRESET) ? (0) : (sample_pow_2_len + p_mip_offset);
@ -272,7 +272,7 @@ void generate_SSIL(out vec3 r_color, out vec4 r_edges, out float r_obscurance, o
// get this pixel's viewspace depth // get this pixel's viewspace depth
pix_z = valuesUL.y; pix_z = valuesUL.y;
// get left right top bottom neighbouring pixels for edge detection (gets compiled out on quality_level == 0) // get left right top bottom neighboring pixels for edge detection (gets compiled out on quality_level == 0)
pix_left_z = valuesUL.x; pix_left_z = valuesUL.x;
pix_top_z = valuesUL.z; pix_top_z = valuesUL.z;
pix_right_z = valuesBR.z; pix_right_z = valuesBR.z;
@ -318,7 +318,7 @@ void generate_SSIL(out vec3 r_color, out vec4 r_edges, out float r_obscurance, o
float obscurance_sum = 0.0; float obscurance_sum = 0.0;
float weight_sum = 0.0; float weight_sum = 0.0;
// edge mask for between this and left/right/top/bottom neighbour pixels - not used in quality level 0 so initialize to "no edge" (1 is no edge, 0 is edge) // edge mask for between this and left/right/top/bottom neighbor pixels - not used in quality level 0 so initialize to "no edge" (1 is no edge, 0 is edge)
vec4 edgesLRTB = vec4(1.0, 1.0, 1.0, 1.0); vec4 edgesLRTB = vec4(1.0, 1.0, 1.0, 1.0);
// Move center pixel slightly towards camera to avoid imprecision artifacts due to using of 16bit depth buffer; a lot smaller offsets needed when using 32bit floats // Move center pixel slightly towards camera to avoid imprecision artifacts due to using of 16bit depth buffer; a lot smaller offsets needed when using 32bit floats

View File

@ -124,14 +124,14 @@ void main() {
vec2 uv = (vec2(gl_GlobalInvocationID.xy) + vec2(0.5, 0.5)) * params.half_screen_pixel_size; vec2 uv = (vec2(gl_GlobalInvocationID.xy) + vec2(0.5, 0.5)) * params.half_screen_pixel_size;
vec4 centre = textureLod(source_ssil, uv, 0.0); vec4 center = textureLod(source_ssil, uv, 0.0);
vec4 value = textureLod(source_ssil, vec2(uv + vec2(-half_pixel.x * 3, -half_pixel.y)), 0.0) * 0.2; vec4 value = textureLod(source_ssil, vec2(uv + vec2(-half_pixel.x * 3, -half_pixel.y)), 0.0) * 0.2;
value += textureLod(source_ssil, vec2(uv + vec2(+half_pixel.x, -half_pixel.y * 3)), 0.0) * 0.2; value += textureLod(source_ssil, vec2(uv + vec2(+half_pixel.x, -half_pixel.y * 3)), 0.0) * 0.2;
value += textureLod(source_ssil, vec2(uv + vec2(-half_pixel.x, +half_pixel.y * 3)), 0.0) * 0.2; value += textureLod(source_ssil, vec2(uv + vec2(-half_pixel.x, +half_pixel.y * 3)), 0.0) * 0.2;
value += textureLod(source_ssil, vec2(uv + vec2(+half_pixel.x * 3, +half_pixel.y)), 0.0) * 0.2; value += textureLod(source_ssil, vec2(uv + vec2(+half_pixel.x * 3, +half_pixel.y)), 0.0) * 0.2;
vec4 sampled = value + centre * 0.2; vec4 sampled = value + center * 0.2;
#else #else
#ifdef MODE_SMART #ifdef MODE_SMART

View File

@ -82,7 +82,7 @@ void main() {
#ifdef PROCESS_MAPA #ifdef PROCESS_MAPA
vec2 uv = (vec2(ssC) + 0.5) * params.half_screen_pixel_size * 2.0; vec2 uv = (vec2(ssC) + 0.5) * params.half_screen_pixel_size * 2.0;
float centre = textureLod(source_importance, uv, 0.0).x; float center = textureLod(source_importance, uv, 0.0).x;
vec2 half_pixel = params.half_screen_pixel_size; vec2 half_pixel = params.half_screen_pixel_size;
@ -100,7 +100,7 @@ void main() {
#ifdef PROCESS_MAPB #ifdef PROCESS_MAPB
vec2 uv = (vec2(ssC) + 0.5f) * params.half_screen_pixel_size * 2.0; vec2 uv = (vec2(ssC) + 0.5f) * params.half_screen_pixel_size * 2.0;
float centre = textureLod(source_importance, uv, 0.0).x; float center = textureLod(source_importance, uv, 0.0).x;
vec2 half_pixel = params.half_screen_pixel_size; vec2 half_pixel = params.half_screen_pixel_size;

View File

@ -62,8 +62,8 @@ void main() {
int mx = int(pix_pos.x % 2); int mx = int(pix_pos.x % 2);
int my = int(pix_pos.y % 2); int my = int(pix_pos.y % 2);
int index_center = mx + my * 2; // center index int index_center = mx + my * 2; // center index
int index_horizontal = (1 - mx) + my * 2; // neighbouring, horizontal int index_horizontal = (1 - mx) + my * 2; // neighboring, horizontal
int index_vertical = mx + (1 - my) * 2; // neighbouring, vertical int index_vertical = mx + (1 - my) * 2; // neighboring, vertical
int index_diagonal = (1 - mx) + (1 - my) * 2; // diagonal int index_diagonal = (1 - mx) + (1 - my) * 2; // diagonal
vec4 color = texelFetch(source_texture, ivec3(pix_pos / uvec2(params.size_modifier), index_center), 0); vec4 color = texelFetch(source_texture, ivec3(pix_pos / uvec2(params.size_modifier), index_center), 0);

View File

@ -24,7 +24,7 @@ struct ProcessVoxel {
uint albedo; // rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neighbors. uint albedo; // rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neighbors.
uint light; // rgbe8985 encoded total saved light, extra 2 bits for neighbors. uint light; // rgbe8985 encoded total saved light, extra 2 bits for neighbors.
uint light_aniso; // 55555 light anisotropy, extra 2 bits for neighbors. uint light_aniso; // 55555 light anisotropy, extra 2 bits for neighbors.
//total neighbours: 26 //total neighbors: 26
}; };
#ifdef MODE_PROCESS_STATIC #ifdef MODE_PROCESS_STATIC
@ -443,10 +443,10 @@ void main() {
imageStore(dst_aniso1, positioni, vec4(aniso1, 0.0, 0.0)); imageStore(dst_aniso1, positioni, vec4(aniso1, 0.0, 0.0));
imageStore(dst_light, positioni, uvec4(light_total_rgbe)); imageStore(dst_light, positioni, uvec4(light_total_rgbe));
//also fill neighbours, so light interpolation during the indirect pass works //also fill neighbors, so light interpolation during the indirect pass works
//recover the neighbour list from the leftover bits //recover the neighbor list from the leftover bits
uint neighbours = (voxel_albedo >> 21) | ((voxel_position >> 21) << 11) | ((process_voxels.data[voxel_index].light >> 30) << 22) | ((process_voxels.data[voxel_index].light_aniso >> 30) << 24); uint neighbors = (voxel_albedo >> 21) | ((voxel_position >> 21) << 11) | ((process_voxels.data[voxel_index].light >> 30) << 22) | ((process_voxels.data[voxel_index].light_aniso >> 30) << 24);
const uint max_neighbours = 26; const uint max_neighbours = 26;
const ivec3 neighbour_positions[max_neighbours] = ivec3[]( const ivec3 neighbour_positions[max_neighbours] = ivec3[](
@ -478,7 +478,7 @@ void main() {
ivec3(1, 1, 1)); ivec3(1, 1, 1));
for (uint i = 0; i < max_neighbours; i++) { for (uint i = 0; i < max_neighbours; i++) {
if (bool(neighbours & (1 << i))) { if (bool(neighbors & (1 << i))) {
ivec3 neighbour_pos = positioni + neighbour_positions[i]; ivec3 neighbour_pos = positioni + neighbour_positions[i];
imageStore(dst_light, neighbour_pos, uvec4(light_total_rgbe)); imageStore(dst_light, neighbour_pos, uvec4(light_total_rgbe));
imageStore(dst_aniso0, neighbour_pos, aniso0); imageStore(dst_aniso0, neighbour_pos, aniso0);

View File

@ -102,10 +102,10 @@ dispatch_data;
struct ProcessVoxel { struct ProcessVoxel {
uint position; // xyz 7 bit packed, extra 11 bits for neighbors. uint position; // xyz 7 bit packed, extra 11 bits for neighbors.
uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neighbours uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neighbors
uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbors
uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbors
//total neighbours: 26 //total neighbors: 26
}; };
layout(set = 0, binding = 11, std430) restrict buffer writeonly ProcessVoxels { layout(set = 0, binding = 11, std430) restrict buffer writeonly ProcessVoxels {
@ -135,10 +135,10 @@ dispatch_data;
struct ProcessVoxel { struct ProcessVoxel {
uint position; // xyz 7 bit packed, extra 11 bits for neighbors. uint position; // xyz 7 bit packed, extra 11 bits for neighbors.
uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neighbours uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neighbors
uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbors
uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbors
//total neighbours: 26 //total neighbors: 26
}; };
layout(set = 0, binding = 6, std430) restrict buffer readonly ProcessVoxels { layout(set = 0, binding = 6, std430) restrict buffer readonly ProcessVoxels {
@ -1016,14 +1016,14 @@ void main() {
store_positions[index].albedo = rgb >> 1; //store as it comes (555) to avoid precision loss (and move away the alpha bit) store_positions[index].albedo = rgb >> 1; //store as it comes (555) to avoid precision loss (and move away the alpha bit)
store_positions[index].albedo |= (facing & 0x3F) << 15; // store facing in bits 15-21 store_positions[index].albedo |= (facing & 0x3F) << 15; // store facing in bits 15-21
store_positions[index].albedo |= neighbour_bits << 21; //store lower 11 bits of neighbours with remaining albedo store_positions[index].albedo |= neighbour_bits << 21; //store lower 11 bits of neighbors with remaining albedo
store_positions[index].position |= (neighbour_bits >> 11) << 21; //store 11 bits more of neighbours with position store_positions[index].position |= (neighbour_bits >> 11) << 21; //store 11 bits more of neighbors with position
store_positions[index].light = imageLoad(src_light, pos).r; store_positions[index].light = imageLoad(src_light, pos).r;
store_positions[index].light_aniso = imageLoad(src_light_aniso, pos).r; store_positions[index].light_aniso = imageLoad(src_light_aniso, pos).r;
//add neighbours //add neighbors
store_positions[index].light |= (neighbour_bits >> 22) << 30; //store 2 bits more of neighbours with light store_positions[index].light |= (neighbour_bits >> 22) << 30; //store 2 bits more of neighbors with light
store_positions[index].light_aniso |= (neighbour_bits >> 24) << 30; //store 2 bits more of neighbours with aniso store_positions[index].light_aniso |= (neighbour_bits >> 24) << 30; //store 2 bits more of neighbors with aniso
} }
groupMemoryBarrier(); groupMemoryBarrier();

View File

@ -1351,8 +1351,8 @@ void fragment_shader(in SceneData scene_data) {
#endif // USE_MULTIVIEW #endif // USE_MULTIVIEW
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
const vec2 neighbours[4] = vec2[](vec2(-1, 0), vec2(1, 0), vec2(0, -1), vec2(0, 1)); const vec2 neighbors[4] = vec2[](vec2(-1, 0), vec2(1, 0), vec2(0, -1), vec2(0, 1));
vec2 neighbour_coord = base_coord + neighbours[i] * scene_data.screen_pixel_size; vec2 neighbour_coord = base_coord + neighbors[i] * scene_data.screen_pixel_size;
#ifdef USE_MULTIVIEW #ifdef USE_MULTIVIEW
float neighbour_ang = dot(normal, textureLod(sampler2DArray(normal_roughness_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), vec3(neighbour_coord, ViewIndex), 0.0).xyz * 2.0 - 1.0); float neighbour_ang = dot(normal, textureLod(sampler2DArray(normal_roughness_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), vec3(neighbour_coord, ViewIndex), 0.0).xyz * 2.0 - 1.0);
#else // USE_MULTIVIEW #else // USE_MULTIVIEW
@ -2082,7 +2082,7 @@ void fragment_shader(in SceneData scene_data) {
float sRed = floor((cRed / pow(2.0f, exps - B - N)) + 0.5f); float sRed = floor((cRed / pow(2.0f, exps - B - N)) + 0.5f);
float sGreen = floor((cGreen / pow(2.0f, exps - B - N)) + 0.5f); float sGreen = floor((cGreen / pow(2.0f, exps - B - N)) + 0.5f);
float sBlue = floor((cBlue / pow(2.0f, exps - B - N)) + 0.5f); float sBlue = floor((cBlue / pow(2.0f, exps - B - N)) + 0.5f);
//store as 8985 to have 2 extra neighbour bits //store as 8985 to have 2 extra neighbor bits
uint light_rgbe = ((uint(sRed) & 0x1FFu) >> 1) | ((uint(sGreen) & 0x1FFu) << 8) | (((uint(sBlue) & 0x1FFu) >> 1) << 17) | ((uint(exps) & 0x1Fu) << 25); uint light_rgbe = ((uint(sRed) & 0x1FFu) >> 1) | ((uint(sGreen) & 0x1FFu) << 8) | (((uint(sBlue) & 0x1FFu) >> 1) << 17) | ((uint(exps) & 0x1Fu) << 25);
imageStore(emission_grid, grid_pos, uvec4(light_rgbe)); imageStore(emission_grid, grid_pos, uvec4(light_rgbe));

View File

@ -251,7 +251,7 @@ RID RenderSceneBuffersRD::create_texture(const StringName &p_context, const Stri
} }
RID RenderSceneBuffersRD::create_texture_from_format(const StringName &p_context, const StringName &p_texture_name, const RD::TextureFormat &p_texture_format, RD::TextureView p_view, bool p_unique) { RID RenderSceneBuffersRD::create_texture_from_format(const StringName &p_context, const StringName &p_texture_name, const RD::TextureFormat &p_texture_format, RD::TextureView p_view, bool p_unique) {
// TODO p_unique, if p_unique is true, this is a texture that can be shared. This will be implemented later as an optimisation. // TODO p_unique, if p_unique is true, this is a texture that can be shared. This will be implemented later as an optimization.
NTKey key(p_context, p_texture_name); NTKey key(p_context, p_texture_name);

View File

@ -111,7 +111,7 @@ public:
Most VR platforms, and our assumption, is that 1 unit in our virtual world equates to 1 meter in the real mode. Most VR platforms, and our assumption, is that 1 unit in our virtual world equates to 1 meter in the real mode.
This scale basically effects the unit size relationship to real world size. This scale basically effects the unit size relationship to real world size.
I may remove access to this property in GDScript in favour of exposing it on the XROrigin3D node I may remove access to this property in GDScript in favor of exposing it on the XROrigin3D node
*/ */
double get_world_scale() const; double get_world_scale() const;
void set_world_scale(double p_world_scale); void set_world_scale(double p_world_scale);

View File

@ -388,13 +388,13 @@ TEST_CASE("[Geometry3D] Segment Intersects Triangle") {
TEST_CASE("[Geometry3D] Triangle and Box Overlap") { TEST_CASE("[Geometry3D] Triangle and Box Overlap") {
struct Case { struct Case {
Vector3 box_centre; Vector3 box_center;
Vector3 box_half_size; Vector3 box_half_size;
Vector3 *tri_verts = nullptr; Vector3 *tri_verts = nullptr;
bool want; bool want;
Case(){}; Case(){};
Case(Vector3 p_centre, Vector3 p_half_size, Vector3 *p_verts, bool p_want) : Case(Vector3 p_center, Vector3 p_half_size, Vector3 *p_verts, bool p_want) :
box_centre(p_centre), box_half_size(p_half_size), tri_verts(p_verts), want(p_want){}; box_center(p_center), box_half_size(p_half_size), tri_verts(p_verts), want(p_want){};
}; };
Vector<Case> tt; Vector<Case> tt;
Vector3 GoodTriangle[3] = { Vector3(3, 2, 3), Vector3(2, 2, 1), Vector3(2, 1, 1) }; Vector3 GoodTriangle[3] = { Vector3(3, 2, 3), Vector3(2, 2, 1), Vector3(2, 1, 1) };
@ -403,7 +403,7 @@ TEST_CASE("[Geometry3D] Triangle and Box Overlap") {
tt.push_back(Case(Vector3(1000, 1000, 1000), Vector3(1, 1, 1), BadTriangle, false)); tt.push_back(Case(Vector3(1000, 1000, 1000), Vector3(1, 1, 1), BadTriangle, false));
for (int i = 0; i < tt.size(); ++i) { for (int i = 0; i < tt.size(); ++i) {
Case current_case = tt[i]; Case current_case = tt[i];
bool output = Geometry3D::triangle_box_overlap(current_case.box_centre, current_case.box_half_size, current_case.tri_verts); bool output = Geometry3D::triangle_box_overlap(current_case.box_center, current_case.box_half_size, current_case.tri_verts);
CHECK(output == current_case.want); CHECK(output == current_case.want);
} }
} }

View File

@ -2773,7 +2773,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") {
CHECK(code_edit->get_line(0) == "''"); CHECK(code_edit->get_line(0) == "''");
CHECK(code_edit->get_caret_column() == 1); CHECK(code_edit->get_caret_column() == 1);
/* Move out from centre, Should match and insert larger key. */ /* Move out from center, Should match and insert larger key. */
SEND_GUI_ACTION(code_edit, "ui_text_caret_right"); SEND_GUI_ACTION(code_edit, "ui_text_caret_right");
SEND_GUI_KEY_EVENT(code_edit, Key::APOSTROPHE); SEND_GUI_KEY_EVENT(code_edit, Key::APOSTROPHE);
CHECK(code_edit->get_line(0) == "''''''"); CHECK(code_edit->get_line(0) == "''''''");