Commit Graph

726 Commits

Author SHA1 Message Date
fe3371a9a9 Add timestamps to some rendering effects 2022-05-21 17:47:28 +02:00
a53434639f Merge pull request #61214 from somnathsarkar/particle-attractor-fix
Fix GPUParticles3D disappearance at attractor origins
2022-05-21 08:48:36 +02:00
99911bfa79 Fix GPUParticles3D disappearance at attractor origins 2022-05-20 19:56:32 -04:00
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
a3e016e07e Fix normal and tangent blending in blend shapes 2022-05-20 07:59:45 -04:00
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
5322b171de Fix tonemapper shader to correctly apply alpha channel 2022-05-18 06:43:07 +03:00
600d8105d8 Fix custom irradiance bug in Vulkan mobile renderer 2022-05-16 11:57:41 -07:00
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
52aeaf5d16 Fix computation of screen_uv 2022-05-16 00:00:01 -04:00
fe8c8eeba8 Copy_to_fb is available in both raster and clustered renderers, remove unwanted checks 2022-05-13 13:19:42 +10:00
9cf9054c3e Merge pull request #60976 from Calinou/fsr-rename-property-hint 2022-05-12 23:12:03 +02:00
ff30a09993 Merge pull request #60643 from clayjohn/GLES3-3D 2022-05-12 21:08:02 +02:00
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
0cdd7d88ad Rename remaining references of FSR to FSR 1.0
With FSR 2.0 around the corner, we should avoid any ambiguity by
explicitly stating the version number.
2022-05-12 18:22:43 +02:00
8b7c7f5a75 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
2bf8831dd6 SceneShader compiling 2022-05-11 21:00:21 -07:00
3bb8e6a9fe SkyShaders working 2022-05-11 21:00:21 -07:00
9939cfc4c4 Split out bokeh_dof and copy effects 2022-05-11 11:08:56 +10:00
a8bbe570ca Rename hint_albedo, hint_white/black in shaders 2022-05-09 22:50:18 +03:00
8ed84a9f01 Fix instance uniform shader crash in custom functions 2022-05-09 17:10:42 +03:00
61df370810 Check multimesh before uniform set creation 2022-05-05 12:25:02 +05:30
10209e31eb Fix the uniform set creation of multimesh with a invalidated buffer 2022-05-05 06:59:47 +05:30
c114823471 Merge pull request #58298 from Calinou/decal-distance-fade-use-easing 2022-05-04 21:50:20 +02:00
fa7a7795f0 Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
6530d46d67 Merge pull request #51102 from Calinou/renderingserver-add-api-version-getter
Add `get_video_adapter_api_version()` to RenderingServer
2022-05-03 14:44:55 +02:00
931838b330 Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
31194f5b1c Add get_video_adapter_api_version() to RenderingServer
This method can be used to get the graphics API version currently in
use (such as Vulkan). It can be used by projects for troubleshooting
or statistical purposes.
2022-05-03 01:18:35 +02:00
618c88c71b Make Decal distance fade smoother
`smoothstep()` avoids the sudden transparency jump when entering or
leaving a decal's distance fade margin distance. This in turn helps
make opacity transitions less noticeable to the player, as it's
less likely to catch the player's eye.
2022-05-02 23:14:00 +02:00
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
c25c837f21 Merge pull request #60682 from Chaosus/shader_vec3_hint_color 2022-05-01 11:23:42 +03:00
5eb3a0ef4a Add hint_color support for vec3 in shaders 2022-05-01 09:47:35 +03:00
623753a3a2 Use linear mipmap sampling in ToneMapper 2022-04-30 21:30:08 -07:00
1bf94dff3a Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
b831fb0a54 Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
cab171c54e Merge pull request #60547 from BastiaanOlij/split_tonemapper_effect
Splitting tonemapper into its own class
2022-04-28 08:33:44 +02:00
3b2267ba6d Splitting tonemapper into its own class 2022-04-28 15:00:30 +10:00
8dfa12cae7 Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
eb497bbaa7 Fix "ortogonal" -> "orthogonal" typo in rasterizer code 2022-04-26 21:49:44 +02:00
2f33414dab Fix clearing backbuffer if there are no items 2022-04-25 22:31:40 +05:00
fbfecc1dea Merge pull request #60407 from JFonS/fix_color_pass_lm 2022-04-25 16:03:08 +02:00
be611c1c05 Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
0d57bbaae5 Add missing color pass flags to the valid list
Some valid flag combinations were missing, causing error spam in certain situations.
2022-04-21 12:37:56 +02:00
de4c97758a Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
c77bbde7ae Merge pull request #60214 from JFonS/fix_depth_prepass
Fix depth pre-pass on all face cull modes
2022-04-19 11:37:34 -07:00
0b4fd92a17 Moved particles into ParticlesStorage 2022-04-17 13:13:22 +10:00
b6faf6c6c0 Move light, reflection probe and lightmap into LightStorage 2022-04-17 13:13:18 +10:00
6b28d94e77 Merge canvas and decal into TextureStorage and add render target 2022-04-17 12:59:50 +10:00
8fee88947e Merge pull request #60213 from JFonS/fix_depth_state 2022-04-13 18:28:49 +02:00