summaryrefslogtreecommitdiffstats
path: root/servers/rendering/rendering_server_canvas.cpp
Commit message (Collapse)AuthorAgeFilesLines
* RenderingServer reorganizationreduz2020-12-041-1553/+0
|
* Reorganize rendering server.reduz2020-12-031-2/+2
| | | | | -Made RenderingServerScene abstract, allowing reimplementation -RenderingServerRaster -> RenderingServerDefault, but this class is going away soon.
* Fixed crash in canvas_item_add_polyline if color arr has incorrect sizeYuri Roubinsky2020-11-301-5/+13
|
* Restored antialiased lines by emulation using triangle stripsYuri Roubinsky2020-11-271-54/+99
|
* Implement signed distance fields for 2D shadersreduz2020-11-261-41/+26
|
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-2/+0
|
* Fix new transform to pixel snapping logicRémi Verschelde2020-11-151-1/+1
| | | | Co-authored-by: lawnjelly <lawnjelly@gmail.com>
* Implement DirectionalLight2Dreduz2020-11-041-34/+49
| | | | | | | 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.
* Refactor pixel snapping.reduz2020-10-301-9/+16
| | | | | | | | | -Rename pixel_snap to snap_2d_to_vertices -Added snap_2d_to_transforms which is more useful Fixes #41814 Solves proposal https://github.com/godotengine/godot-proposals/issues/1666 Supersedes #35606, supersedes #41535, supersedes #41534
* Implement CanvasGroup and CanvasItem clippingreduz2020-10-281-2/+94
| | | | | | | | -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.
* Refactored 2D shader and lighting systemreduz2020-10-241-75/+76
| | | | | | | | | | -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.
* Make YSort stableJohn Pennycook2020-09-271-0/+1
| | | | | | Keeps track of the order in which items are collected by _collect_ysort_children, and uses that order to break ties between items with similar Y positions.
* Clarify comparison precedence when enabling or disabling back buffer.Marcel Admiraal2020-09-071-7/+6
|
* Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-271-1/+3
| | | | Extra `_2d` suffixes are removed from 2D methods accoringly.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-17/+30
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+35
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-127/+0
| | | | | | | | | | | | | | 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.
* Replace NULL with nullptrlupoDharkael2020-04-021-18/+18
|
* More server renames for consistency after #37361Rémi Verschelde2020-03-281-1/+1
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-0/+1479
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.