Commit graph

7886 commits

Author SHA1 Message Date
Hendrik Brucker 043ae91560 Restructure and reimplement vsync options
-Add a v-sync mode setting which allows to choose between DISABLED, ON, ADAPTIVE and MAILBOX
-Removed the V-Sync via Compositor option
2021-07-06 16:34:26 +02:00
George Marques 0525467fbc
Fix TileSet::CellNeighbor enum binding
Having the TileSet:: prefix has some unintended consequences in the
bindings, in particular in the extension API dump.
2021-07-06 11:07:58 -03:00
reduz 7f6027927a Fix Subsurface Scattering
* Works again
* Transmittance also works again
* Removed the curve patamter, exp() function is good enough.
2021-07-05 17:17:45 -03:00
PouleyKetchoupp ccac36a6e2 Remove unused PhysicsShapeQueryResult3D & PhysicsShapeQueryResult2D 2021-07-05 11:16:11 -07:00
reduz f4379cbc82 Clean up Tree
Fixes some problems introduced by #49917

* Tree used minimum size as a stretch ratio, so it forced a minimum size of 1.
* Minimum size redone, stretch ratio moved to a separate setting
* Fitting to contents was enforced, this is more intuitive, but in many situations this is undesired.
* Added a clip content option for situations where fit to contents does not apply.
* Icon would scroll with the item, making it invislbe if the item is too long.
* Made icon always appear to the right (or left if RTL is enabled) of the visible item space.
2021-07-04 13:13:53 -03:00
Rémi Verschelde cb4e42155d
Merge pull request #50054 from reduz/curve-texture-3d
Implement Curve3Texture
2021-07-03 20:32:18 +02:00
Rémi Verschelde e849dc1791
Merge pull request #50080 from reduz/fix-old-mesh-compatibility
Add compatibility with old mesh formats
2021-07-03 17:13:34 +02:00
reduz d6893cb2e8 Implement Curve3Texture
* This was required by users in some scenarios, such as animating individual axes over time with a single texture.
* Examples: Shaders, Particles, etc.
* CurveTexture now defaults to RGB, can be changed to Red if needed, this allows to freely exchange them.
2021-07-03 12:11:01 -03:00
Rémi Verschelde 4cb6986cdb
Merge pull request #50096 from reduz/fix-render-info
Fix Render Info
2021-07-03 17:04:07 +02:00
reduz 6c55d2aad2 Fix Render Info
* Fixed and redone the process to obtain render information from a viewport
* Some stats, such as material changes are too difficult to guess on Vulkan, were removed.
* Separated visible and shadow stats, which causes confusion.
* Texture, buffer and general video memory can be queried now.
* Fixed the performance metrics too.
2021-07-03 10:15:04 -03:00
Rémi Verschelde a525e77740
Merge pull request #49468 from menip/FixGetScreenPosition
Fix Control::get_screen_position() not considering viewport scale
2021-07-03 14:29:20 +02:00
Rémi Verschelde a8fb450b3c
Merge pull request #50092 from YeldhamDev/window_get_contents_expose
Expose `Window.get_contents_minimum_size()` to scripts
2021-07-02 22:12:11 +02:00
Rémi Verschelde 676027fc3d
Merge pull request #50089 from YeldhamDev/splitcontainer_minimal_fix
Make invisible `SplitContainer` nodes correctly calculate the minimal size of its children
2021-07-02 22:11:30 +02:00
Michael Alexsander a829e88ddc Expose Window.get_contents_minimum_size() to scripts 2021-07-02 15:35:56 -03:00
Hugo Locurcio 5370f4876e
Remove leftovers from the DirectionalLight3D Optimized shadow depth range
The Optimized shadow depth range was removed in late 2020 in favor
of the Stable shadow depth range, but it still had a (broken) property
that allowed to enable it.
2021-07-02 20:32:43 +02:00
Michael Alexsander e4d56e4c62 Make invisible SplitContainer nodes correctly calculate the minimal size of its children 2021-07-02 14:39:50 -03:00
reduz a632f9fd6e Add compatibility with old mesh formats
* Can load 2.x meshes
* Can load 3.x meshes
2021-07-02 12:34:54 -03:00
Aaron Franke 2508fd0533
Use PROPERTY_USAGE_NONE instead of 0 for no property usage
Also use const more often.
2021-07-01 14:13:27 -04:00
Rémi Verschelde ad8a2b3d52
Merge pull request #50040 from reduz/fix-renderingserver-bindings
Clean up RenderingServer and its bindings
2021-07-01 15:17:33 +02:00
reduz 37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
Rémi Verschelde ba376a0452
Merge pull request #50037 from reduz/move-color-to-8bit
Import mesh colors in 8BPC
2021-07-01 08:15:13 +02:00
reduz 9ad0c6cde7 Import mesh colors in 8BPP.
* Colors were imported as 16BPP (half float)
* Far most common use cases only require 8BPP
* If you need higher data precision, use a custom array, which are supported now.

**WARNING**: 3D Scenes imported in 4.0 no longer compatible with this new format. You need to re-import them (erase them from .godot/import)
2021-06-30 23:33:25 -03:00
Eric 525ad7c37e Enable Camera2D smoothing on limit change 2021-06-30 16:21:29 -07:00
Rémi Verschelde 915344fe76
Merge pull request #49834 from nekomatata/physics-disable-modes
Add support for controlling physics nodes' behavior when disabled
2021-06-30 20:36:36 +02:00
Rémi Verschelde 270f9d4c88
Merge pull request #50014 from reduz/remove-immediate
Deprecate ImmediateGeometry
2021-06-30 20:18:59 +02:00
reduz 85cf99f28e Deprecate ImmediateGeometry
* Removed entirely from RenderingServer.
* Replaced by ImmediateMesh resource.
* ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future.
* Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4).
* RootMotionView works again.
* Polygon3D editor works again.
2021-06-30 14:14:41 -03:00
Rémi Verschelde a02620f3a5
Merge pull request #50009 from reduz/fix-suffixes-and-degrees
Fix editor suffixes and degrees conversion
2021-06-30 18:47:40 +02:00
PouleyKetchoupp 5cbdc7a0ac Add support for controlling physics nodes' behavior when disabled
New property disable_mode to set different behaviors:
Remove: remove from physics simulation
MakeStatic: change body mode to static (doesn't affect area and soft body)
KeepActive: do nothing

Extra change:
Handle disable/enable node state with specific notifications, in order
to differentiate global pause from disabled nodes.
2021-06-30 09:20:44 -07:00
reduz 75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -03:00
Rémi Verschelde bcd1fc832f
Merge pull request #49901 from nekomatata/move-and-collide-fix-slide
Fix move_and_collide causing sliding on slopes
2021-06-30 02:18:01 +02:00
reduz d07f7c8d25 Fixes to 2D viewport
* Editor 2D viewport now uses embedded subwindows (windows no longer pop up)
* Restored the ability to disable 3D on the 2D viewport (makes 3D not display on 2D when there is a camera on the scene)
2021-06-29 17:40:45 -03:00
Rémi Verschelde 90982d60cb
Merge pull request #37181 from jitspoe/master.button_icon_alignment 2021-06-29 13:31:53 +02:00
Rémi Verschelde 653f544ca3
Merge pull request #49713 from nekomatata/fix-export-var-override-runtime
Fix export var override in PackedScene at runtime
2021-06-29 12:45:43 +02:00
Rémi Verschelde 9c6d7f840f
Merge pull request #49970 from trollodel/graphnode_fix_port_position
Fix GraphNode port position when the control has the Expand flag
2021-06-29 12:41:58 +02:00
jitspoe e192eb05db
Add alignment options to icons on buttons.
They can now be centered and right-aligned.

Fixes #11380.
2021-06-29 12:31:40 +02:00
Rémi Verschelde 8fb7a9f023
Merge pull request #49719 from LightningAA/rename-node-is-ancestor-of
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-29 12:07:25 +02:00
Rémi Verschelde 76ba2ffef1
Merge pull request #49993 from groud/fix_debbuger_crash
Fixes crash in case no column in tree is expanded and has minimum size
2021-06-29 11:52:30 +02:00
Gilles Roudière c5b65236d8 Fixes crash in case no column in tree is expanded and has minimum size 2021-06-29 11:27:09 +02:00
Gilles Roudière 30a615dd94 Implement painting properties over TileSets 2021-06-29 11:07:46 +02:00
PouleyKetchoupp 9758a75221 Fix move_and_collide causing sliding on slopes
Make sure the direction of the motion is preserved, unless the depth is
higher than the margin, which means the body needs depenetration in any
direction.

Also changed move_and_slide to avoid sliding on the first motion, in
order to avoid issues with unstable position on ground when jumping.

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-06-28 17:17:52 -07:00
trollodel 07c3b40aa2 Fix GraphNode port position when the control has the Expand flag 2021-06-28 18:52:13 +02:00
Rémi Verschelde 89f270f4c5
Merge pull request #49917 from groud/tree_disable_scroll
Allow disabling scrolling in Tree and implement horizontal scrolling
2021-06-28 18:41:23 +02:00
Rémi Verschelde 492d741a3e
Merge pull request #49951 from Calinou/standardmaterial3d-height-triplanar-print-warning
Print warning in StandardMaterial3D when height and triplanar are active
2021-06-28 18:36:59 +02:00
Gilles Roudière d7d32ced5b Implement Tree's internal minimum width calculation 2021-06-28 15:54:31 +02:00
Hugo Locurcio 8fc96fc51a
Print warning in StandardMaterial3D when height and triplanar are active
Using both height mapping and triplanar mapping isn't supported.
2021-06-28 14:46:20 +02:00
Yuri Roubinsky 46cd36f009 Fix auto-connection from output node to input (VisualShaders) 2021-06-28 14:38:08 +03:00
Rémi Verschelde f030b0c83d
Merge pull request #49953 from Calinou/reflectionprobe-tweak-default-extents
Increase the default ReflectionProbe extents to Vector3(10, 10, 10)
2021-06-28 13:30:02 +02:00
Hugo Locurcio f28b55b551
Increase the default ReflectionProbe extents to Vector3(10, 10, 10)
On top of having a more realistic size out of the box, this matches
the default VoxelGI extents for better usability.
2021-06-27 16:46:03 +02:00
Hugo Locurcio 9a4c76ea12
Fix flipped binormal in StandardMaterial3D triplanar mapping
This made normal maps on triplanar materials use an inverted Y direction
compared to non-triplanar materials.
2021-06-27 16:28:57 +02:00
reduz b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00