451c3fc0fb
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. |
||
---|---|---|
.github | ||
core | ||
doc | ||
drivers | ||
editor | ||
main | ||
misc | ||
modules | ||
platform | ||
scene | ||
servers | ||
thirdparty | ||
.appveyor.yml | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
AUTHORS.md | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
compat.py | ||
CONTRIBUTING.md | ||
COPYRIGHT.txt | ||
DONORS.md | ||
gles_builders.py | ||
icon.png | ||
icon.svg | ||
LICENSE.txt | ||
logo.png | ||
logo.svg | ||
LOGO_LICENSE.md | ||
methods.py | ||
platform_methods.py | ||
README.md | ||
SConstruct | ||
version.py |
Godot Engine
Homepage: https://godotengine.org
2D and 3D cross-platform game engine
Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, Mac OSX, Windows) as well as mobile (Android, iOS) and web-based (HTML5) platforms.
Free, open source and community-driven
Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.
Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.
Getting the engine
Binary downloads
Official binaries for the Godot editor and the export templates can be found on the homepage.
Compiling from source
See the official docs for compilation instructions for every supported platform.
Community and contributing
Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.
To get in touch with the developers, the best way is to join the #godotengine IRC channel on Freenode.
To get started contributing to the project, see the contributing guide.
Documentation and demos
The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.
The class reference is also accessible from within the engine.
The official demos are maintained in their own GitHub repository as well.
There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more info.