Virtualx Game Engine. Forked from Godot 3.6
Find a file
lawnjelly 451c3fc0fb GLES2 2D batching - item reordering, light joining and light modulate fix
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.
2020-05-01 07:47:33 +01:00
.github Delete ISSUE_TEMPLATE.md 2019-09-04 15:29:49 -03:00
core Merge pull request #38257 from RandomShaper/imvu/fix_variantrc_gdnative 2020-04-27 18:43:10 +02:00
doc GLES2 2D batching - item reordering, light joining and light modulate fix 2020-05-01 07:47:33 +01:00
drivers GLES2 2D batching - item reordering, light joining and light modulate fix 2020-05-01 07:47:33 +01:00
editor i18n: Sync translations with Weblate 2020-04-27 10:32:51 +02:00
main DocData: Skip unexposed classes 2020-04-21 14:15:34 +02:00
misc Set the title tag in the HTML5 export immediately 2020-04-27 10:19:33 +02:00
modules Merge pull request #38011 from madmiraal/fix-csg-3.2 2020-04-27 17:05:47 +02:00
platform Set the title tag in the HTML5 export immediately 2020-04-27 10:19:33 +02:00
scene Merge pull request #38156 from Calinou/tweak-ssao-property-hints-3.2 2020-04-25 12:55:33 +02:00
servers GLES2 2D batching - item reordering, light joining and light modulate fix 2020-05-01 07:47:33 +01:00
thirdparty Fix compilation of jpgd.cpp on MSVC 2017 2020-04-23 10:36:06 +02:00
.appveyor.yml Enable Appveyor cache on 3.2 branch. 2020-02-19 11:53:02 +01:00
.clang-format clang-format: Set standard for ObjC++ 2019-02-09 12:20:24 +01:00
.editorconfig Re-architecture of the Godot Android plugin. 2020-03-09 10:30:02 +01:00
.gitattributes Git: Explicitly list binary files as such to avoid EOL change 2019-05-25 10:43:48 +02:00
.gitignore Re-architecture of the Godot Android plugin. 2020-03-09 10:30:02 +01:00
.mailmap Update AUTHORS and DONORS list 2020-04-17 13:41:43 +02:00
.travis.yml Travis: Force updating homebrew on macOS 2020-02-21 09:43:23 +01:00
AUTHORS.md Update AUTHORS and DONORS list 2020-04-17 13:41:43 +02:00
CHANGELOG.md Changelog: Mention 3.2 changes to TileMap features 2020-02-06 13:02:08 +01:00
CODE_OF_CONDUCT.md Add a link to the code of conduct in the repository 2019-12-22 18:05:24 +01:00
compat.py fixed building using scons with python3 2018-05-28 18:41:16 +01:00
CONTRIBUTING.md Fix some URLs to use HTTPS when available 2020-01-29 02:48:10 +01:00
COPYRIGHT.txt Revert "assimp: Sync with upstream 0201fc5" 2020-03-09 10:43:08 +01:00
DONORS.md Update AUTHORS and DONORS list 2020-04-17 13:41:43 +02:00
gles_builders.py Remove trailing whitespace 2018-11-20 11:15:02 +01:00
icon.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
icon.svg Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
LICENSE.txt Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
logo.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
logo.svg Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
LOGO_LICENSE.md Improve documentation of thirdparty code snippets 2017-05-07 11:42:37 +02:00
methods.py Remove the dead function win32_spawn from methods.py. 2020-03-25 11:38:54 +01:00
platform_methods.py Fixed short circuiting on non-Windows platforms 2018-07-30 23:55:15 +02:00
README.md Add Weblate badge to README.md 2019-07-06 00:22:31 -03:00
SConstruct assimp: Clean and document buildsystem, prepare for unbundling 2020-03-06 23:53:23 +01:00
version.py Set version to 3.2.2-beta 2020-04-16 11:07:56 +02:00

Godot Engine logo

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.

Screenshot of a 3D scene in Godot Engine

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.

Travis Build Status AppVeyor Build Status Code Triagers Badge Translate on Weblate