Commit graph

2324 commits

Author SHA1 Message Date
Hugo Locurcio 4bd5e4fd9b
Use the standard C INFINITY and NAN constants directly
The `Math_INF` and `Math_NAN` defines were just aliases for those
constants, so we might as well use them directly.

Some portions of the code were already using `INFINITY` directly.
2021-07-21 10:41:08 +02:00
Aaron Franke 78b0a7da03
Use is_equal_approx in more places 2021-07-21 00:32:37 -04:00
Rémi Verschelde fa56989818
Merge pull request #50537 from Calinou/improve-shader-error-output-2
Add error marking to the shader error console output
2021-07-20 11:00:17 +02:00
Rémi Verschelde 394191c02f
Merge pull request #50605 from Calinou/tweak-shader-code-style
Use C++11 raw literals for shader code to improve readability
2021-07-20 10:05:13 +02:00
Rémi Verschelde 1ba87f0c82
Merge pull request #50618 from reduz/implement-more-specialization-constants
Implement more rendering options as specialization constants
2021-07-20 08:54:21 +02:00
reduz 9293bc3935 Implement more rendering options as specialization constants
* Shadow quality settings now specialization constant.
* Decal and light projector filters can be set.
* Changing those settings forces re-creation of the pipelines.

These changes should help improve performance related to shadow mapping, and allows improving performance by sacrificing decal and light projector quality.
2021-07-19 21:51:29 -03:00
PouleyKetchoupp 940838c174 One-directional collision layer check for rigid bodies and soft bodies
Check for each body individually if it collides with the other one or
ignores it.

When a body is being ignored, the other body's mass is considered
infinite when applying impulses to avoid extra overlapping.
2021-07-19 17:24:04 -07:00
Rémi Verschelde db010bd71d
Merge pull request #50604 from aaronfranke/float-array-cast
Explicitly cast real_t to float when creating a float array
2021-07-19 22:47:57 +02:00
Marcel Admiraal b8fe576355 Ensure KinematicBodies only interact with other Bodies with matching mask. 2021-07-19 17:03:43 +01:00
Rémi Verschelde 855c7c7414
Merge pull request #50566 from reduz/optimize-stringname-usage
Optimize StringName usage
2021-07-19 15:20:25 +02:00
Hugo Locurcio abc38b8d66
Use C++11 raw literals for shader code to improve readability
In files that have lots of branching, `\t` was replaced with a
tab character instead.
2021-07-19 08:19:50 +02:00
Aaron Franke 09f0596eb2
Explicitly cast to float when creating a float array 2021-07-19 01:21:22 -04:00
reduz 6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Hugo Locurcio 9fc2849a57
Add error marking to the shader error console output
This makes it possible to see where the shader error is without
having to look at the trace printed below the source code.
2021-07-17 03:05:11 +02:00
reduz 76e25438c9 Fixes to forward mobile
* use valid format for framebuffer: VK_FORMAT_A2B10G10R10_UNORM_PACK32
* Unfortunately cant be used for compute.
* Mobile will need to do refprobe, sky, mipmapblurring using raster.
2021-07-15 21:05:58 -03:00
Yuri Roubinsky 14d5b47a27 Prevent error if varying assigned but not used (push warning instead) 2021-07-15 18:07:19 +03:00
Rémi Verschelde 64fb4fac89
Merge pull request #49996 from Chaosus/shader_localvar_warning
Added a shader warning about unused local variable
2021-07-15 16:19:22 +02:00
Juan Linietsky 3f12765a7e
Merge pull request #49678 from BastiaanOlij/mobile_renderer_select_color_format
Use 32bit instead of 64bit 3D render buffer on mobile renderer
2021-07-15 10:16:39 -03:00
fabriceci cee814e4df Fixing 2D moving platform logic
Fixing by applying the movement in two steps, first the platform
movement, and then the body movement. Plus, add the platform movement
when we are on_wall.
2021-07-15 11:54:43 +02:00
Yuri Roubinsky d6dc77aa36 Removes lines about window size from the console output 2021-07-14 20:58:53 +03:00
Yuri Sizov 0f78e36e1c Check if there are new docs missing on CI 2021-07-14 14:21:03 +03:00
Rémi Verschelde 96a69899d0
Merge pull request #50255 from Calinou/physicsserver3d-add-set-iterations
Add a method to set the number of physics solver iterations in 3D
2021-07-14 07:56:24 +02:00
Rémi Verschelde bc6ea71771
Merge pull request #50063 from nekomatata/more-accurate-move-and-slide
Make move_and_slide collision detection more accurate
2021-07-13 20:41:09 +02:00
Juan Linietsky e2a2138d2b
Merge pull request #50402 from reduz/use-specialization-constants
Use specialization constants in clustered renderer
2021-07-13 14:15:42 -03:00
Rémi Verschelde 4e4bcbc986
Merge pull request #47604 from christinoleo/master
Separate underscore from grapheme punctuation to enable doubleclick and caret jump over snakecase variables in editor
2021-07-13 19:09:11 +02:00
Rémi Verschelde 8747f25653
Merge pull request #50381 from reduz/implement-disable-classes
Implement the ability to disable classes
2021-07-13 15:31:38 +02:00
Leonardo Christino 8b91828e4f Separate underscore from grapheme punctuation to enable doubleclick and caret jump over snakecase variables in editor 2021-07-13 10:03:26 -03:00
reduz 5ad4f26659 Implement the ability to disable classes
* This PR adds the ability to disable classes when building.
* For now it's only possible to do this via command like:
  `scons disable_classes=RayCast2D,Area3D`
* Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-13 09:25:14 -03:00
Rémi Verschelde aab6dc301c
Merge pull request #50086 from Geometror/label-improve-layout-options
Improvements to Label's layout options
2021-07-13 13:10:42 +02:00
Bastiaan Olij 8a29208fc4 Use 32bit instead of 64bit 3D render buffer on mobile 2021-07-13 10:26:28 +10:00
reduz ad9f606ed8 Use specialization constants in clustered renderer
* Keep track of when projector, softshadow or directional sofshadow were enabled.
* Enable them via specializaton constant where it makes sense.
* Re-implements soft shadows.
* Re-implements light projectors.
2021-07-12 20:33:52 -03:00
Rémi Verschelde b218c6785e
Merge pull request #50194 from BastiaanOlij/fix_multiple_reflection_probes
Fix indexing of multiple reflection probes
2021-07-12 19:22:47 +02:00
TaskManagerCZ e3be0913d7 Explicit error message when setting active a Viewport that is already active.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-07-12 13:27:45 +02:00
Hendrik Brucker 74ab336fe3 Change VSync mode project setting enum type from string to integer 2021-07-12 03:35:51 +02:00
reduz b2f6db7aa8
Implement Specialization Constants
* Added support to our local copy of SpirV Reflect (which does not support it).
* Pass them on render or compute pipeline creation.
* Not implemented in our shaders yet.
2021-07-11 23:16:09 +02:00
Hugo Locurcio f0a145bbf5
Add a method to set the number of physics solver iterations in 3D
This is only for GodotPhysics, and adds a 3D counterpart to the 2D
method that was recently added.
2021-07-10 16:28:34 +02:00
Hugo Locurcio a2d5f191d8
Merge pull request #48622 from Geometror/reimplement-disableable-vsync 2021-07-10 01:02:23 +02:00
reduz 83addd6ee5 Fix material invalidation on reimport.
* IF a texture was reimported (calling replace as an example), it would invalidate all materials using it, causing plenty of errors.
* Added the possibility to get a notification when a uniform set is erased.
* With this notification, materials can be queued for update properly.
2021-07-07 19:55:20 -03:00
reduz 24efb13f7e Fix threaded update for textures
* Previews and other stuff now works again.
* Not the best solution, will have to be improved in the future usinc async queues where supported.
2021-07-07 18:06:06 -03:00
Rémi Verschelde 48a5226829
Merge pull request #50193 from reduz/fix-command-queue-crash
Fix Command Queue Crash
2021-07-07 16:36:13 +02:00
reduz d41e3f9aeb Fix Command Queue Crash
* No longer allow sending an object (texture) to the server as material parameter
* Keep a parameter cache locally in ShaderMaterial
2021-07-07 10:57:56 -03:00
Rémi Verschelde 29e59798c1
Merge pull request #50240 from nekomatata/fix-backface-collision-disabled
Fix concave collision with backface collision disabled
2021-07-07 08:31:15 +02:00
PouleyKetchoupp 72087b8158 Fix concave collision with backface collision disabled
Disabled backface collision is only applied on face separation axes,
because applying it also on edges and vertices was causing some contacts
to be wrongly disabled and contact points to be off.
2021-07-06 18:53:29 -07:00
reduz c43f624d44 Unify material parameter update
* Unifies how material parameters are updated.
* Single function, easier to maintain.
* Updates materials properly when textures change.
2021-07-06 18:57:38 -03:00
Hugo Locurcio 7f845d913a
Fix warning message spam when a VoxelGI node is selected in the editor
Support for anisotropy in VoxelGI was removed during its development
due to the high cost. This was a leftover from anisotropy support.
2021-07-06 23:02:59 +02:00
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
Bastiaan Olij b3612351a8 Fix indexing of multiple reflection probes 2021-07-06 13:00:33 +10: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
Daniel Doran 82bb8f1531 Fix transparency sorting 2021-07-05 03:19:42 -06:00
Hendrik Brucker 56a8d3f30c Improvements to Label's layout options
- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
2021-07-04 16:43:55 +02:00
Rémi Verschelde 5c3055e0fe
Merge pull request #50137 from reduz/fix-boot-splash
Fix Boot Splash
2021-07-04 09:40:36 +02:00
Rémi Verschelde 67c08e27a5
Merge pull request #50138 from Calinou/debug-overdraw-lower-opacity
Decrease opacity of the overdraw debug draw mode
2021-07-04 09:39:36 +02:00
Rémi Verschelde 8838e3d3d4
Merge pull request #50144 from reduz/fix-ssr
Fix SSR
2021-07-04 09:20:22 +02:00
reduz 0e366dc7ac Fix SSR
* Was broken at some point long time ago, this restores it.
2021-07-03 23:32:34 -03:00
reduz ab3314e955 Fix SDFGI
* Broken by 7513b73902, fixes #49631
2021-07-03 21:24:37 -03:00
Hugo Locurcio 27aa8dc68e
Decrease opacity of the overdraw debug draw mode
This allows distinguishing higher amounts of overlapping objects.
2021-07-04 00:19:14 +02:00
reduz 6e1c5e346a Fix Boot Splash
* Implements the code to show the boot splash on load using RenderingDevice
* Does not work on X11 when maximized, some platform specific hack will be needed there.
2021-07-03 18:09:19 -03:00
reduz fe17a6c907 Fix render debug modes.
* Ovedraw debug works again
* Lighting debug works again
2021-07-03 14:50:36 -03: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
Bastiaan Olij e86aeb85ce Properly override virtual functions in render_scene_render_rd and subclasses 2021-07-03 20:32:40 +10:00
Rémi Verschelde b9b128cb1d
Merge pull request #50102 from nekomatata/expose-body-test-motion-3d
Expose body_test_motion in 3D physics server
2021-07-03 09:29:46 +02:00
PouleyKetchoupp 62e577267f Expose body_test_motion in 3D physics server
Results are exposed through PhysicsTestMotionResult3D, the same way it's
done for 2D.

Also cleaned a few things in the 2D version.
2021-07-02 18:03:44 -07: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
PouleyKetchoupp cf1ddfdb90 Make move_and_slide collision detection more accurate
More accurate unsafe motion calculation
* Safe and unsafe motion are calculated by dichotomy with a limited
number of steps. It's good for performance, but on long motions that
either collide near the beginning or near the end, the result can be
very imprecise.
* Now a factor 0.25 or 0.75 is used to converge faster when this case
happens, which allows longer motions to get more accurate collision
detection.
* Makes snap collision more precise, and helps with cases where diagonal collision on the border of a platform can lead to the character being stuck.

Additional improvements to move_and_slide:
* Handle slide canceling in move_and_collide with 0 velocity instead of
not applying it.
* Better handling of snap with custom logic to cancel sliding.
* Remove small jittering when using stop on slope, by canceling the
motion completely when the resulting motion is less than margin instead
of always projecting to the up direction (in both body motion and snap).

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-07-01 15:15:42 -07:00
Juan Linietsky eefe276a82
Merge pull request #50058 from reduz/fix-surface-from-arrays
Fix surface from array creation
2021-07-01 17:50:02 -03:00
reduz 8cf812fba1 Fix surface from array creation
* The debug check was not updated to the new format.
* Bug introduced by #50037
2021-07-01 16:51:55 -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
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
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 24c6ee9f56
Merge pull request #49844 from nekomatata/physics-disabled-shapes
Fix and clean disabled shapes handling in godot physics servers
2021-06-30 10:08:52 +02: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
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 d55ebc3a5d Fix non uniform scaling in 3D objects
* Flag was there, but not implemented.
* Fixed issue with base flags not being initialized.
2021-06-29 11:45:59 -03:00
Yuri Roubinsky 5100eed012 Added a shader warning about unused local variable 2021-06-29 15:39:37 +03: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
Bastiaan Olij a9604b425f Move render_sky logic from effects into our sky object, and some minor cleanup 2021-06-26 18:46:47 +10: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
Rémi Verschelde e4430771db
Merge pull request #49885 from reduz/implement-render-pass-support
Implement Framebuffer Subpass support
2021-06-25 15:00:01 +02:00
reduz bde6f5eed1 Implement Framebuffer Subpass support
* Required for better optimizing mobile platforms
* Will be used by the Vulkan mobile renderer.
2021-06-24 15:59:15 -03:00
Rémi Verschelde a01ea509f5
Merge pull request #49826 from groud/fix_mesh_transform
Keep the drawing transform when drawing meshing in CanvasItem
2021-06-24 19:38:56 +02:00
Gilles Roudière ccbf31685d Fixes Mesh2D drawn without modulation 2021-06-23 17:38:31 +02:00
PouleyKetchoupp a65cdca894 Fix and clean disabled shapes handling in godot physics servers
In 3D, disabled shapes are now not added to the broadphase anymore.
Since they are removed right away when disabled, no need to check for
disabled shapes for any query that comes from the broadphase.
Also Fixes raycast queries returning disabled shapes.

In 2D, disabled shapes where already not added to the broadphase.
Remove the same unnecessary checks as in 3D.

Overall harmonized API for disabled shapes in the physics servers and
removed duplicate method.
2021-06-22 16:51:47 -07:00
Gilles Roudière e8476c994d Keep the drawing transform when drawing meshing in CanvasItem 2021-06-22 11:41:28 +02:00
Aaron Franke 0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Rémi Verschelde 76fd91c084
Merge pull request #49737 from JFonS/fix_vis_range
Fix crash in visibility range system.
2021-06-20 00:32:42 +02:00
Bastiaan Olij 0a6a71973e
Merge pull request #49615 from BastiaanOlij/inverse_xr_camera_offset
Inverse XR camera offset for stereoscopic rendering
2021-06-19 20:19:53 +10:00
jfons 2c0819992c Fix crash in visibility range system. 2021-06-19 11:43:41 +02:00
Bastiaan Olij b1bbbb4439 Inverse XR camera offset for stereoscopic rendering 2021-06-19 19:33:40 +10:00
jfons a0b19d2561 Fix "Ignore Occlusion Culling" flag. 2021-06-18 21:42:03 +02:00
Rémi Verschelde 92f20fd70e
Merge pull request #49659 from LightningAA/string-valid-integer-to-int 2021-06-18 16:14:14 +02: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 6e98c4cd50 Refactor VisibilityNotifier3D
* This is the 3D counterpart to #49632
* Implemented a bit different as 3D works using instancing

After merged, both 2D and 3D classes will most likely be renamed in a separate PR to DisplayNotifier2D/3D.
2021-06-16 18:50:39 -03:00
Lightning_A b6af2a29eb Rename is_valid_integer() to is_valid_int()
Method from `String`
2021-06-16 10:32:22 -06: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
Rémi Verschelde c2ba45fcc8
Merge pull request #49630 from kodiwills/fix-custom-irradiance-typo
Fix typo in `CUSTOM_IRRADIANCE` calculations
2021-06-15 22:37:54 +02:00
Kodi 69e1f25299 Fix typo in CUSTOM_IRRADIANCE calculations 2021-06-15 15:17:00 -04:00
Rémi Verschelde ec323f0ef4
Merge pull request #49584 from timothyqiu/shader-data-null-check
Add missing null check for ShaderData
2021-06-14 19:18:20 +02:00
Rémi Verschelde 3f613236e0
Merge pull request #49576 from clayjohn/VULKAN-SSAO-uniform-sets
Store SSAO uniform sets per viewport
2021-06-14 19:05:19 +02:00
Rémi Verschelde 0610c559ec
Merge pull request #49585 from timothyqiu/oh-unsigned
Fix invalid read when using MultiMesh
2021-06-14 18:35:36 +02:00
Rémi Verschelde 6c1445bfea
Merge pull request #48847 from JFonS/vis_deps
Implement visibility range and dependencies
2021-06-14 17:22:59 +02:00
jfons 3a53ae5d9f Implement visibility range and dependencies.
This commit adds the following properties to GeometryInstance3D: `visibility_range_begin`,
`visibility_range_begin_margin`, `visibility_range_end`, `visibility_range_end_margin`.

Together they define a range in which the GeometryInstance3D will be visible from the camera,
taking hysteresis into account for state changes. A begin or end value of 0 will be ignored,
so the visibility range can be open-ended in both directions.

This commit also adds the `visibility_parent` property to 'Node3D'.
Which defines the visibility parents of the node and its subtree (until
another parent is defined).

Visual instances with a visibility parent will only be visible when the parent, and all of its
ancestors recursively, are hidden because they are closer to the camera than their respective
`visibility_range_begin` thresholds.

Combining visibility ranges and visibility parents users can set-up a quick HLOD system
that shows high detail meshes when close (i.e buildings, trees) and merged low detail meshes
for far away groups (i.e. cities, woods).
2021-06-14 12:17:11 +02:00
Haoyu Qiu 1b122345c2 Fix invalid read when using MultiMesh 2021-06-14 13:19:40 +08:00
Haoyu Qiu fa907ce829 Add missing null check for ShaderData 2021-06-14 13:00:35 +08:00
Bastiaan Olij 3eae812331 Fixed error spam when XR mode is not enabled and a missed setting rename 2021-06-14 11:05:16 +10:00
clayjohn fc93e10092 Store SSAO uniform sets per viewport 2021-06-13 10:42:10 -07:00
Bastiaan Olij 15c1a76361 Add stereoscopic rendering through multiview 2021-06-13 22:52:20 +10:00
reduz ce783689f8 Make shader compiler again after roughness limiter fix
Fix shader compilation error after merging #49549
2021-06-12 21:40:51 -03:00
Juan Linietsky bb94344937
Merge pull request #49549 from clayjohn/VULKAN-roughness-limiter
Fix roughness limiter derivative
2021-06-12 21:29:34 -03:00
clayjohn 9a5e00be6f Fix roughness limiter derivative 2021-06-12 17:02:05 -07:00
reduz 7513b73902 Fix VoxelGI (works again).
It was broken due to #46046, this makes it work again.
2021-06-12 20:37:56 -03:00
Rémi Verschelde 2787ee634a
Merge pull request #49520 from pfertyk/issue-46278-empty-texture-crashes-godot
Validate texture in RendererStorageRD::free
2021-06-12 22:27:14 +02:00
Paweł Fertyk 31cd42373b Validate texture in RendererStorageRD::free 2021-06-11 20:12:23 +02:00
Rémi Verschelde 530e069bc3
Merge pull request #49312 from RandomShaper/reference_to_ref_count
Rename `Reference` to `RefCounted`
2021-06-11 19:46:25 +02:00
Rémi Verschelde 50d1e0ea99
Merge pull request #47835 from mortarroad/master-lossless-webp
Implement lossless WebP encoding
2021-06-11 19:34:36 +02:00
reduz c2138bdc87 Fix tangent importing
* Binormal compression was wrong.
2021-06-11 14:13:58 -03:00
Pedro J. Estébanez 04688b92ff Rename Reference to RefCounted 2021-06-11 18:48:42 +02:00
Morris Tabor 1bc1e94208 Implement lossless WebP encoding 2021-06-11 18:46:04 +02:00
Rémi Verschelde 9e328bb5b7
Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
Rémi Verschelde 9aedc020c3
Merge pull request #42636 from madmiraal/fix-infinite-inertia 2021-06-11 13:00:31 +02:00
Yuri Roubinsky 9539e4e39e
Merge pull request #49456 from Chaosus/fix_shader_length
Fix `length()` array function usage in shader
2021-06-10 11:07:59 +03:00
Yuri Roubinsky 7dd65a066e Fix length() array function usage in shader 2021-06-10 10:04:28 +03:00
reduz c66b2651a6 Refactor CommandQueueMT
* RingBuffer had no reason to be in this context
* A single buffer is used that can grow as much as the game needs.

This should make thread loading entirely reliable.
2021-06-09 13:10:49 -03:00
Yuri Roubinsky 5d5400a3b1 Fix shader compilation with render_mode: specular_phong 2021-06-09 08:38:03 +03:00
Yuri Roubinsky 4daca0b580 Removes deleted OrenNayar mode from shaders and materials 2021-06-08 15:50:40 +03:00
PouleyKetchoupp 19dee4702a Fix uninitialized members in physics query results 2021-06-07 10:46:24 -07:00
Rémi Verschelde c1c76850cb
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.
2021-06-07 11:03:08 +02:00
Yuri Roubinsky eec82d9f75 Prevent shader crash when returning array when return type is scalar 2021-06-06 14:59:52 +03:00
reduz 32625145c8 Rename GI Classes
* GIProbe is now VoxelGI
* BakedLightmap is now LightmapGI

As godot adds more ways to provide GI (as an example, SDFGI in 4.0), the different techniques (which have different pros/cons) need to be properly named to avoid confusion.
2021-06-05 09:28:56 -03:00
Rémi Verschelde 6f7d45d210
Merge pull request #45364 from madmiraal/rename-quat
Rename Quat to Quaternion
2021-06-05 13:32:08 +02:00
andriyDev 9f4bf5ec80 Deleted YSort, moved its functionality directly into Node2D.
YSort now has a compatibility alias to Node2D.
Updated TileMap to use the existing Node2D y_sort_enabled property instead
of its own property.
Updated Node2D doc to include the new y_sort_enabled member.
Updated TileMap doc to remove its mention of cell_y_sort.
Deleted YSort doc.
2021-06-05 00:55:25 -07:00
PouleyKetchoupp b2bd9f4e51 Safe margin cleanup
Safe margin property on CharacterBody only, used as argument in
move_and_collide.

Removed kinematic_safe_margin in 3D physics server, not really useful
and now harmonized with 2D.
2021-06-04 11:40:36 -07:00
PouleyKetchoupp ee4b756a51 More explanatory names for RigidBody modes
MODE_DYNAMIC instead of MODE_RIGID
MODE_DYNAMIC_LOCKED instead of MODE_CHARACTER

No more special case for sleeping behavior for MODE_DYNAMIC_LOCKED
(MODE_CHARACTER was forcing the body not to sleep, which is redundant
with can_sleep and wasn't done in Bullet).
2021-06-04 11:40:36 -07:00
PouleyKetchoupp ba13d23140 KinematicBody split between new CharacterBody and PhysicsBody
PhysicsBody now has methods move_and_collide/test_move and needed
properties for these methods: safe margin, locked axes (3D only).

Moved collision_exceptions from StaticBody to PhysicsBody for 3D
(same as 2D, and conforms to documentation).

RigidBody doesn't have test_motion method anymore, it's now redundant
with PhysicsBody.test_move.
2021-06-04 11:40:36 -07:00
Marcel Admiraal 8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
Rémi Verschelde 5d9cab3aeb
Merge pull request #38430 from aaronfranke/transform3d 2021-06-03 23:07:21 +02:00
Rémi Verschelde ea2a0b5455
Merge pull request #43450 from aaronfranke/mouse-mode-bitwise
Add MOUSE_MODE_CONFINED_HIDDEN to MouseMode enum
2021-06-03 22:00:15 +02:00
Aaron Franke 94bc0bd919
Rename Vector2 clamped to limit_length and add limit_length to Vector3 2021-06-03 12:04:57 -04:00
Aaron Franke 98aa3b669e
Add MOUSE_MODE_CONFINED_HIDDEN
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-06-03 11:44:28 -04:00
Aaron Franke a3c29ed899
Rename files and the exposed name for Transform3D 2021-06-03 07:30:01 -04:00
Aaron Franke 08a85352fb
Rename Variant TRANSFORM to TRANSFORM3D
Also _transform to _transform3d
2021-06-03 07:30:01 -04:00
Aaron Franke de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Fabio Alessandrelli 8cdef21d6c Move remaining dummy drivers to servers. 2021-06-01 16:50:32 +02:00
Rémi Verschelde 59b524ae4c
Merge pull request #49067 from JFonS/fix_gcc_warnings
Fix some warnings raised by GCC-11.1
2021-06-01 10:47:37 +02:00
Rémi Verschelde da23f99123
Merge pull request #49185 from DrRevert/inertia_nan_fix
GodotPhysics: Avoid NaNs when calculating inertias for bodies without mass/area
2021-05-31 12:56:36 +02:00