Commit graph

283 commits

Author SHA1 Message Date
Rémi Verschelde 96aff740fe
Merge pull request #44809 from Calinou/physics-render-layers-zero-index
Use zero-indexing for physics and render layer names
2021-01-01 23:37:37 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Hugo Locurcio f87d42f4ca
Use zero-indexing for physics and render layer names
The first layer is now Layer 0 instead of Layer 1, and the last
layer is now Layer 19 instead of Layer 20.

This helps reference physics and render layers from scripts since
layers start from 0 there.
2020-12-30 16:03:11 +01:00
Hugo Locurcio 57dcc83152
Rename the TextureProgress node to TextureProgressBar
Advantages:

- When searching for "progressbar", you'll see both nodes in the
  search results.
- More consistent with Button/TextureButton.
2020-12-14 21:35:13 +01:00
Rémi Verschelde 92c001ef09
Merge pull request #43931 from bruvzg/ctl_comp_font
[Complex Text Layouts] Add compatibility for legacy Font resources.
2020-12-09 11:28:11 +01:00
Marcel Admiraal df6b061dbb Rename CubeMesh BoxMesh 2020-12-05 11:48:26 +00:00
bruvzg 3c3590522f
[Complex Text Layouts] Add compatibility for legacy Font resources. 2020-12-03 10:34:03 +02:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Andrii Doroshenko (Xrayez) ba68383706 Add AspectRatioContainer class
Co-authored-by: Ugis Brekis <ugis.brekis@productmadness.com>
2020-11-25 15:06:40 +02:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
reduz f123981a96 Implement DirectionalLight2D
Also separated Light2D in PointLight2D and DirectionalLight2D.
Used PointLight2D because its more of a point, and it does not work
the same as OmniLight (as shape depends on texture).
Added a few utility methods to Rect2D I needed.
2020-11-04 10:03:01 -03:00
reduz 8ab9b39707 Implement CanvasGroup and CanvasItem clipping
-Allows merging several 2D objects into a single draw operation
-Use current node to clip children nodes
-Further fixes to Vulkan barriers
-Changed font texture generation to white, fixes dark eges when blurred
-Other small misc fixes to backbuffer code.
2020-10-28 18:53:32 -03:00
reduz 84d734da0e Refactored 2D shader and lighting system
-Removed normal/specular properties from nodes
-Create CanvasTexture, which can contain normal/specular channels
-Refactored, optimized and simplified 2D shaders
-Use atlas for light textures.
-Use a shadow atlas for shadow textures.
-Use both items aboves to make light rendering stateless (faster).
-Reorganized uniform sets for more efficiency.
2020-10-24 15:57:25 -03:00
Yuri Roubinsky f402e1e675 Added VisualShaderNodeCurve to easy gather data from a CurveTexture 2020-10-18 09:57:15 +03:00
reduz 26f5bd245c Implement GPU Particle Collisions
-Sphere Attractor
-Box Attractor
-Vector Field
-Sphere Collider
-Box Collider
-Baked SDF Collider
-Heightmap Collider
2020-10-09 13:25:47 -03:00
Paulb23 a0b409cb14 Add and convert editor to use CodeEdit 2020-09-10 20:35:27 +01:00
Yuri Roubinsky 5ba8246cfb Added Texture3D to visual shaders 2020-09-10 07:40:06 +03:00
Hugo Locurcio 3e0226515e
Rename ShortCut to Shortcut which is more grammatically correct
See https://github.com/godotengine/godot/issues/16863#issuecomment-685236980.
2020-09-09 21:54:54 +02:00
reduz a674da4eec Implement 3D textures as import and resource format. 2020-09-09 13:50:21 -03:00
PouleyKetchoupp e869e6eb0c Add Viewport/SubViewport node compatibility 2020-08-23 20:18:11 +02:00
Andrii Doroshenko (Xrayez) 6f426c3360 Port ClassDB tests to use doctest
Extracted the most minimal core initialization functionality from
`setup()` and `setup2()` so that `ClassDB` could be tested properly
(input, audio, rendering, physics etc, are excluded).

Display and rendering servers/singletons are not initialized at all.

Due to the fact that most subsystems are disabled, fixed various crashes in the
process (in order):
- `AcceptDialog` OK/cancel swap behavior (used `DisplayServer` while
  `register_scene_types()`);
- `make_default_theme` which depends on `RenderingServer`;
- `XRServer` singleton access while calling `register_modules_types()`;
- hidden bug in a way joypads are cleaned up (MacOS and Linux only).

Removed manual `ClassDB` init/cleanup calls from `test_validate_testing.h`.

ClassDB tests:

Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2020-08-16 16:41:02 +03:00
Yuri Roubinsky 7ddaff47a3 Added UniformRef visual shader node 2020-07-28 14:44:53 +03:00
bruvzg 0181c3dde1
Docs: Ignore OS specific values (constants, project settings, properties). 2020-07-15 12:24:59 +03:00
Rémi Verschelde c8523038cc
Merge pull request #40268 from DanielZTing/master
Fix cancel/OK button order on macOS
2020-07-15 09:21:04 +02:00
Paulb23 bc4cee4458 Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
2020-07-11 17:09:58 +01:00
Paulb23 2f1080be9b Convert syntax highlighters into a resource 2020-07-11 15:26:58 +01:00
Daniel Ting 9605fc54c7 Fix cancel/OK button order on macOS
The macOS platform convention regarding button order is cancel on left,
OK on right.
2020-07-10 15:10:11 -05:00
Yuri Roubinsky ecb5f7ea23 Added 'fma' function to shader language 2020-07-10 19:58:03 +03:00
Rémi Verschelde 372136fe75 Environment: Refactor code for readability + more
- Makes all boolean setters/getters consistent.
- Fixes bug where `glow_hdr_bleed_scale` was not used.
- Split CameraEffects to their own source file.
- Reorder all Environment method and properties declarations,
  definitions and bindings to be consistent with each other
  and with the order of property bindings.
- Bind missing enum values added with SDFGI.
- Remove unused SDFGI enhance_ssr boolean.
- Sync doc changes after SDFGI merge and other misc changes.
2020-07-01 14:44:45 +02:00
Hugo Locurcio 31b7f02a29
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-06-19 20:49:49 +02:00
Yuri Roubinsky cb9cbf840d Added Texture2DArray support to visual shaders 2020-06-19 18:02:05 +03:00
Andrii Doroshenko (Xrayez) 9bb070b030 Move RayShape2D implementation into its own translation unit 2020-06-01 01:52:07 +03:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Ignacio Etcheverry af78a69b6f Fix C# bindings after lightmapper changes 2020-05-13 15:54:30 +02:00
Juan Linietsky 1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
Rémi Verschelde 0ef8bcac4d DocData: Skip unexposed classes
Properly expose classes that we actually want accessible.
2020-04-20 12:51:10 +02:00
Juan Linietsky 0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
Juan Linietsky 5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
Bastiaan Olij afc8c6391c Renaming all ARVR nodes to XR 2020-04-09 15:33:01 +10:00
Rémi Verschelde 59d44ee872
Merge pull request #37505 from YeldhamDev/viewcont_rename
Rename ViewportContainer to SubViewportContainer
2020-04-03 15:53:35 +02:00
Juan Linietsky 87c658b304 Re-Added screen space reflection. 2020-04-02 11:25:21 -03:00
Michael Alexsander 0c6851ae53 Rename ViewportContainer to SubViewportContainer 2020-04-01 16:11:44 -03:00
Michael Alexsander 46a6751302 Register SubViewport class 2020-03-30 16:43:55 -03:00
Rémi Verschelde eaaee63b62 doc: Update classref with node renames
A few extra renames for classes which were missed in last week's PRs.
2020-03-30 18:23:02 +02:00
Rémi Verschelde 0c320a6bf3 More server renames for consistency after #37361 2020-03-28 13:20:48 +01:00
Rémi Verschelde d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Rémi Verschelde c3a760c507 Fix build with disable_3d=yes, remove dependency on WorldEnvironment 2020-03-27 14:55:14 +01:00
Juan Linietsky eaae4b6408 Renamed 2D and 3D nodes to make their types explicit
Fixes #30736.
2020-03-27 14:54:04 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky 9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00