Commit graph

63 commits

Author SHA1 Message Date
kleonc
bbb2a889d8 Fix Y-sort modulate for top-most Y-sorted CanvasItem 2023-06-12 13:33:26 +02:00
lawnjelly
b69c8b4791 Single Compilation Unit build.
Adds support for simple SCU build (DEV_ENABLED only).
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-06-06 15:36:51 +01:00
Rémi Verschelde
0821262167
Merge pull request #77079 from kleonc/y_sort_fix_modulation_propagation
Fix modulation propagation for Y-sorted CanvasItems
2023-05-24 08:47:50 +02:00
Rémi Verschelde
6d88c83611
Merge pull request #71684 from kleonc/draw_polyline_simplify_antialiased
`RendererCanvasCull` Simplify drawing antialiased polyline
2023-05-24 08:44:19 +02:00
kleonc
5d8219b4fd Fix modulation propagation for Y-sorted CanvasItems 2023-05-15 01:32:41 +02:00
Danil Alexeev
ba985ecf3f
Fix draw_multiline_colors() for width < 0 2023-03-14 09:43:56 +03:00
kleonc
728c51e362 CanvasItem::draw_polyline Support thin polylines drawn using line strip 2023-01-19 21:08:25 +01:00
kleonc
f29e39cfd6 RendererCanvasCull Simplify drawing antialiased polyline 2023-01-19 17:08:39 +01:00
kleonc
43fc483e6c CanvasItem::draw_arc Clamp angle difference so arc won't overlap itself 2023-01-18 15:16:22 +01:00
Rémi Verschelde
2156250471
Merge pull request #62236 from MinusKube/master
Fix polyline not supporting closed polygons and not having a uniform width
2023-01-16 22:13:07 +01:00
MinusKube
01af885e69 Fix draw_polyline not supporting closed polygons and not having a uniform offset 2023-01-16 20:27:30 +01:00
Danil Alexeev
a8cbb6245b
Fix scaling issue in draw_line and similar methods 2023-01-16 12:49:58 +03:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
bruvzg
20d9457f9d
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior. 2022-12-17 22:47:54 +02:00
Yaohua Xiong
9bdc0cb16f draw fish bones for Path2D and Path3D
These fish bones are add to indicate the direction and local transforms alone the path.
2022-12-05 15:39:14 +08:00
Rindbee
7129718dc5 Fix child nodes still being drawn when the visible area of a control with clip_contents enabled is 0 2022-12-01 19:47:33 +08:00
kobewi
1778301cd0 Add call_deferred() method to Callable 2022-11-04 17:24:34 +01:00
BimDav
fcb9be66a2 Viewport canvas cull mask feature
Co-authored-by: Valentin Zagura <puthre@gmail.com>
2022-10-31 14:09:49 +01:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Hendrik Brucker
e235bca995 Fix/restore BackBufferCopy 2022-09-15 02:36:39 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
Rémi Verschelde
f450f242b9
Merge pull request #62639 from Calinou/line-antialiasing-decrease-feather-width 2022-08-02 21:00:01 +02:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Xentripetal
f514b82fd3 Account for relative z-indexes when y-sorting 2022-07-08 09:18:00 -05:00
Hugo Locurcio
cf1ce8494d
Improve antialiased line drawing sharpness and respect of original width
Antialiased lines with a width of 2 pixels or more now use a smaller
feather width of 1.25 instead of 2.0. This makes them look sharper
and better preserves their original shape while still having good
antialiasing quality.

This also improves the appearance of thin antialiased lines by
slightly increasing their feather size (from 1.0 to 1.25). It
makes them appear a tad thicker, but the antialiasing quality is
much improved by doing this.
2022-07-02 18:45:42 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Aaron Franke
b831fb0a54
Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
Bastiaan Olij
0b4fd92a17 Moved particles into ParticlesStorage 2022-04-17 13:13:22 +10:00
Bastiaan Olij
6b28d94e77 Merge canvas and decal into TextureStorage and add render target 2022-04-17 12:59:50 +10:00
Yuri Roubinsky
6e9535a9c8 Restore antialiasing for draw_line 2022-04-12 13:03:56 +03:00
Yuri Rubinsky
31d2304ac4
Merge pull request #57899 from Chaosus/fix_aa 2022-04-11 18:29:54 +03:00
Bastiaan Olij
b8be7903f3 Move storage for Mesh, MeshInstance, MultiMesh and Skeleton into MeshStorage 2022-04-02 16:29:04 +11:00
Dimitris Nikolaidis
02572884f4 Fix canvas_group not being freed in RendererCanvasCull::free 2022-03-29 15:45:27 +03:00
Bastiaan Olij
57e5a33623 Split dummy renderer classes into separate files
Split canvas_texture_storage and texture_storage from render_storage class
2022-03-16 17:43:10 +11:00
Hugo Locurcio
c509a3a3a5
Tweak render timestamp names for explicitness and consistency
- Add 2D and 3D in timestamp names when needed to avoid ambiguity.
- Use present tense in all render timestamp names.
- Add a space after ">" (begin) and "<" (end) symbols.
- Remove redundant "End" in render timestamp names (indicated by "<").
2022-03-04 08:46:12 +01:00
Yuri Roubinsky
a85b000967 Fix antialiasing for beginning/end of line in canvas_item_add_polyline 2022-02-16 14:34:42 +03:00
Haoyu Qiu
7870cf24f2 Fix invalid read when using LightOccluder2D 2022-01-17 16:02:26 +08:00
Darren Kaste
b0d9e14155 Fix canvas items being drawn outside clip rects 2022-01-09 18:15:46 -05:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Aaron Franke
e9808e3d9a
Add a double-precision editor build to CI 2021-12-09 09:52:48 -06:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Hugo Locurcio
ba65730cbf
Rename RID's getornull() to get_or_null() 2021-09-29 23:58:02 +02:00
Anilforextra
cc51b045da Construct values only when necessary. 2021-09-23 22:26:07 +05:45
bruvzg
4c3f7d1290 Makes FontData importable resource.
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
Yuri Roubinsky
59c137a99b Fix incorrect border width of antialiased lines 2021-08-10 09:08:02 +03:00
reduz
64c925cca6 Improve RID_Owner memory usage
* Ability to allocate empty objects in RID_Owner, so RID_PtrOwner is not needed in most cases.
* Improves cache usage, as objects are now allocated together
* Should improve performance in 2D rendering
2021-06-29 12:28:08 -03:00
reduz
94d31ac327 Implement animation slice drawing in CanvasItem
* Added a function to ignore subsequent commands if they don't fall within the slice.
* This will be used by the new TileMap to properly provide animated tiles.
2021-06-17 12:42:27 -03:00
reduz
38d164c74b Refactor VisibilityNotifier
* Works from RenderinServer
* Accurately tells when on or off-scren, its no longer approximate.
* VisibilityEnabler also simplified to use the process mode instead.
2021-06-16 10:48:57 -03:00