The method is used to either inflate or deflate a polygon.
For translating/transforming a polygon, use `Transform2D.xform`.
(cherry picked from commit 19b72da35d)
The Haiku port now resides at:
https://github.com/godotengine/godot-haiku-platform
While we're happy to support as many Free and Open Source platforms as we can,
we need to put the main focus on the platforms that we can reasonably maintain,
and for Haiku we have been lacking maintainers ever since the port was first
merged in 2015.
The Haiku code has not been compiling and much less working at least since the
release of Godot 3.0, and while some attempts have been made at fixing things,
it's still not functional today in the `3.2` branch (and much less in `master`,
understandably).
Having it in an external repository should hopefully enable Haiku contributors
to fix issues in their own time, and possibly tag versions compatible with
past Godot releases once they are ready.
(cherry picked from commit efcc508ee5)
The Image.create_from_data doc describes the "use_mipmaps" argument as a
way to generate mipmaps, but this method only allocates and loads data.
This can cause confusion, where this function reads more or less data
than expected. Update the doc to be more specific that create_from_data
is loading the mipmaps from the raw data.
(cherry picked from commit 09b324b5b6)
Opaque objects are rendered using the depth buffer, so the end result
appears sorted, but the opaque objects themselves are not sorted.
(cherry picked from commit 608bc8f3dc)
Configured for a max line length of 120 characters.
psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:
- Manually wrapped strings will be reflowed, so by using a line length
of 120 for the sake of preserving readability for our long command
calls, it also means that some manually wrapped strings are back on
the same line and should be manually merged again.
- Code generators using string concatenation extensively look awful,
since black puts each operand on a single line. We need to refactor
these generators to use more pythonic string formatting, for which
many options are available (`%`, `format` or f-strings).
- CI checks and a pre-commit hook will be added to ensure that future
buildsystem changes are well-formatted.
(cherry picked from commit cd4e46ee65)
Scaling tilemaps can cause border artifacts around the edges of tiles. This has been traced to precision issues in the GPU. This PR adds an adjustment to allow a minor contraction of the UVs of rects in order to compensate for the incorrect classification of texels across the UV border.
Add clarification to docs to explain that when an `AnimationPlayer`
object is paired with an `AnimationTree`, several properties and
methods exposed by the `AnimationPlayer` class may not work as expected.
The issues occur because an `AnimationTree` runs independently, and
uses its member `AnimationPlayer* player` primarily for its
`Map<StringName, AnimationData> animation_set`.
Added descriptions for `root_motion_track` and `get_root_motion_transform`.
(cherry picked from commit 0451248ff1)
`get_char_size()` is a public virtual function defined in the `Font`
class. Implementations exist for both `BitmapFont` and `Dynamic Font`.
However, it was only exposed to the GDScript API through the Bitmap
Font, and not for Dynamic Font.
This commit exposes the function through `Font` instead.
Fixes#23967
(cherry picked from commit a4413710f9)
As it now seems like we will soon have GLES3 batching working using the same intermediate layer as GLES2, it makes more sense to reuse the same batching settings for both renderers rather than duplicate project settings for GLES2 and GLES3.
`OS.shell_open()` will pass on the path directly to the OS' shell
handler (which can handle file paths or URLs). It can't handle
Godot-specific paths, so these need to be converted with
`ProjectSettings.globalize_path()` first.
(cherry picked from commit d46e411b44)
Although 2D draws in painters order with strict ordering, in certain circumstances items can be reordered to increase batching / decrease state changes, without affecting the end result. This can be determined by an overlap test.
In situation with item:
A-B-A
providing the third item does not overlap the second, they can be reordered:
A-A-B
Items already contain an AABB which can be used for this overlap test.
1)
To utilise this, I have implemented item reordering (only for single rects for now), with the lookahead adjustable in project settings. This can increase performance in situations where items may not be grouped in the scene tree by texture. It can also be switched off (by setting lookahead to 0).
2)
This same trick can be used to help join items that are lit. Lit items previously would prevent joining completely, thus missing out on performance gains other than multi-command items such as tilemaps.
In this PR, lights are assigned as bits in a bitfield (up to 64, the optimization is disabled above this), and on each try_item (for joining), the bitfield for lights and shadows is constructed and compared with the previous items. If these match the 2 items can potentially be joined. However, this can only be done without changing the rendered result if an overlap test is successful.
This overlap test can be adjusted to join items up to a specific number of item references, selectable in project settings, or turned off.
3)
The legacy uniform single rect drawing routine seems to have been identified as the source of flicker, particularly on nvidia. However, it can also be up to 2x as fast. Because of the speed the batching contains a fallback where it can use the legacy single rect method, but I have now added a project setting to make this switchable. In most cases with batching it should not be necessary (as single rects are drawn less frequently) and thus the flickering can be totally avoided.
4)
This PR also fixes a color modulate bug when drawing light passes, in certain situations (particularly custom _draw routines with multiple rects).
5)
This PR also fixes#38291, a bug in the legacy renderer where light passes could draw rects in wrong position.
This references Godot's winding order at the top of every
procedural geometry class, as well as referencing other classes
within a given geometry class.
A warning about ImmediateGeometry3D performance was also added.
(cherry picked from commit ed7347d73d)
This also replaces a non-breaking space that was accidentally added in
the EditorFeatureProfile documentation.
This closes#31393.
(cherry picked from commit 2f46f1e7b1)
Added project setting to enable / disable print frame diagnostics every 10 seconds. This prints out a list of batches and info, which is useful to optimize games and identify performance problems.
I had no idea what 'coordinate' meant in the context of autotiles, so just adding some clarification for future people who have the same problem.
(cherry picked from commit cbe73766e3)
* Added additional clarification for the function of the 'deep'
parameter in the Dictionary's `duplicate` method.
(cherry picked from commit 469b7c948f)
* item_selected and item_focused docs incorrectly had 'id' as the parameter. Changed to
'index'.
* Fix parameter name in ADD_SIGNAL callin code.
(cherry picked from commit a8de034f78)
Added information about the intervals of values that the functions
`store_{8,16,32,64}()` can correctly write to the file.
(cherry picked from commit 97e20b2f30)
Godot by default has a limit of 16 reflection probes in a scene. this can be increased by increasing atlas subdiv. For 3.2 and possibly 4.0. This also fixes a spelling mistake
Update doc/classes/ReflectionProbe.xml
Fix from clayjohn, Directly link to settings
Co-Authored-By: Clay John <claynjohn@gmail.com>
2d rendering is currently bottlenecked by drawing primitives one at a time, limiting OpenGL efficiency. This PR batches primitives and renders in fewer drawcalls, resulting in significant performance improvements. This also speeds up text rendering.
This PR batches across canvas items as well as within items.
The code dynamically chooses between a vertex format with and without color, depending on the input data for a frame, in order to optimize throughput and maximize batch size. It also adds an option to use glScissor to reduce fillrate in light passes.
The name of the property responsible for physics fps is fixed:
this is `Engine.iterations_per_second`, not `Engine.target_fps`.
(cherry picked from commit 6e5cd36b12)
Signal bone_setup_changed remains undocumented. I took a quick look at
the cpp code, but its purpose remained unclear to me. If anyone can
steer me in the right direction, I'm happy to flesh this out.
(cherry picked from commit 9151992432)
- Duplicate the header when the `-a` flag is enabled. Since lots of
items are displayed in this case, this helps the user remember
which column is which without having to scroll back to the top.
- Bolden the overall percentages for easier visual grepping.
(cherry picked from commit 7c3f6b2870)
Many newcomers are confused about which one to choose for animating
properties. This should help clarify the situation with regards
to AnimationPlayer versus Tween.
(cherry picked from commit 810b1341ce)
We already removed it from the online docs with #35132.
Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.
We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
- Add some missing descriptions.
- Add links to tutorials for ARVR and AnimationTree.
- Style fixes.
- Engine changes:
* Make `AnimationNodeTransition.input_<number>` properties internal
so that they don't appear in the docs. They still appear in the
inspector based on the actual number of inputs requested.
* Drop unimplemented `CPUParticles.flatness`. It's only used for 3D
particles in `ParticlesMaterial`, and thus only relevant for
`CPUParticles3D`.
I improved dictionary description to ad some real life examples and expand on it a little bit so person who never seen dictionary can understand it better seeing them for a first time here.
I also added note about the way to compare dictionaries as it can catch people of guard because common assumption is that it works the same as comparing Arrays when it does not.
Reverts the following commits:
- c81ec6f26d:
"Exposes capture methods to AudioServer, variable renames for
consistency, added documentation."
- 47c558b98a:
"Expose audio callbacks as signals."
- dabaa11b3c:
"Fix to make sure the capture buffers are deallocated at shutdown.
Silences warnings."
Some documentation improvements were kept for pre-existing methods.
See rationale for reverting these changes in #30468.
It mostly fixes issues I have listed in https://github.com/godotengine/godot-docs/issues/3065 where GraphNode description was rather lacking clarity. It was near impossible how to use the them or how to create new slots etc.
I improved it quite a bit if anyone has idea how to reword original "A tuple of input and output slots is defined for each GUI element included in the GraphNode." I would love to hear it. I am unsure how to word it in more understandable way.
* Recently supported macOS shortcuts are added
* Makes it clear than `set_text` won't trigger `text_changed`
* `minimum_spaces` is the number of space characters that can be shown
without scrolling
When there is no collision with a floor the get_floor_normal() function
should return the zero vector to be consistent with get_floor_velocity().
Renames floor_normal to up_direction in all bindings.
Updates the documentation of get_floor_normal() and get_floor_velocity()
to make it clear when the values are valid. Updates the documentation for
move_and_slide() and move_and_slide_with_snap() to use the new up_direction
parameter name.
- Drop the "Brief description" header as it became redundant
with this change.
- Fix a bug in the editor help where an extraneous newline was added
after the header if the class isn't inherited by any others.
- Remove the Category line in the rST markup as it's not useful
for API users.
I expanded boolean long description with example of when booleans could be use practice because
Boolean
Description:
Boolean built-in type.
was pretty vague. As new to programming person it took me longer than it should have to understand what those are and why I would want to use them. Hopefully this will make it clearer to new users reading documentation
Update bool.xml