Commit graph

2122 commits

Author SHA1 Message Date
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
Rémi Verschelde 52ab531a56
Merge pull request #49161 from lawnjelly/fix_canvas_rect_bound4
[4.x] Fix canvas rect bound calculation
2021-05-31 11:34:46 +02:00
reduz 0d2e02945b Implement shader caching
* Shader compilation is now cached. Subsequent loads take less than a millisecond.
* Improved game, editor and project manager startup time.
* Editor uses .godot/shader_cache to store shaders.
* Game uses user://shader_cache
* Project manager uses $config_dir/shader_cache
* Options to tweak shader caching in project settings.
* Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled).
* Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated).
* Added shader compression with SMOLV: https://github.com/aras-p/smol-v
2021-05-31 10:13:09 +02:00