Commit graph

2765 commits

Author SHA1 Message Date
sakrel
16a8967757 Fix DirectionalLight2D and PointLight2D shadows not rendering correctly 2022-07-15 23:55:15 +02:00
Hugo Locurcio
21ea1c3835
Rename soft shadow quality project settings for easier searching
`rendering/quality/shadows` is now `rendering/quality/positional_shadow`
to explicitly denote that the settings only affect positional light shadows,
not directional light shadows.

Shadow atlas settings now contain the word "atlas" for easier searching.

Soft shadow quality settings were renamed to contain the word "filter".
This makes the settings appear when searching for "filter" in the
project settings dialog, like in Godot 3.x.
2022-07-13 19:56:02 +02:00
bruvzg
0c5431644d
Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose. 2022-07-07 11:07:18 +03:00
Yuri Rubinsky
3dc1a1dbfb Prevent possible crash when mesh is freed 2022-07-06 19:52:54 +03:00
Rémi Verschelde
55fca1cb94
Merge pull request #62344 from BastiaanOlij/extract_dependencies 2022-07-06 13:24:46 +02:00
Hugo Locurcio
c9037a8d2c
Remove unused anisotropy setter/getter methods in VoxelGI
These methods weren't exposed to the scripting API.

Anisotropy was used in earlier iterations of VoxelGI, but it was
removed as it was too expensive.
2022-07-06 02:40:49 +02:00
Shlomi
22da234eb6 Add Desktop to file dialog drive on Unix 2022-07-05 13:10:15 +02:00
Fredia Huya-Kouadio
f9c19298ce Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
2022-07-05 03:00:37 -07:00
Rémi Verschelde
08044aa2e3 Vulkan: Make loader_get_json "error" a verbose message on Windows
In far most cases it seems like it's going to message about bogus manifests
in the Windows registry which point to JSON files which have since been
uninstalled, but without clearing the registry.

This happens with bogus Vulkan overlays from Twitch, Epic Online Services,
NVIDIA Nsight Systems, OBS Studio, Rockstar Games... fix your mess folks.

Fixes #56089.
2022-07-02 19:25:01 +02:00
Rémi Verschelde
6bbfd160b0 SCons: Properly track codegen script dependency for generated GLSL headers 2022-07-02 16:01:48 +02:00
Pedro J. Estébanez
95ac9081d6 Use a more robust method of determining writability of bindings 2022-06-30 20:07:30 +02:00
Pedro J. Estébanez
a82352c7e3 Avoid manual memory management of certain arrays in Vulkan RD 2022-06-28 10:01:46 +02:00
Pedro J. Estébanez
3d58b79792 Fix confusion between Vulkan and RD storage buffer usage values 2022-06-28 10:01:46 +02:00
Pedro J. Estébanez
525de52b08 Stop debug time full barriers preventing layout transitions in Vulkan RD 2022-06-28 10:01:45 +02:00
Pedro J. Estébanez
e1645567a6 Optimize texture update in Vulkan RD 2022-06-28 10:01:45 +02:00
Pedro J. Estébanez
509c0eb86b Apply some small fixes/enhancements to the Vulkan RD
- Initialize queue indices to values meaning 'unset'
- Remove unused parameters & members
- Make texture update access flags consistent with texture copy
- Fix style and pass type of some parameters
- Synchronize setup-draw in flush with a semaphore
- Add no current list validation to draw_list_begin_splits()
- Update texture usage flags on destination of copy
- Fix misuse of Vulkan flag
2022-06-28 10:01:45 +02:00
Pedro J. Estébanez
fc6ac4a155 Consider uniform writability part of the interface of the set 2022-06-27 21:56:18 +02:00
Bastiaan Olij
ecfcfd97fa Split dependency logic
Split FOG
Split visibility notifier
Final cleanup of storage classes
2022-06-28 00:10:29 +10:00
Bastiaan Olij
997810e417 Split GI effects and fix stereoscopic rendering of GI effects 2022-06-22 12:50:17 +10:00
reduz
141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
Bastiaan Olij
b4821fe2e0 Introduce eye_offset for correcting stereoscopic reflections
Use view instead of vertex for reflections.
2022-06-17 19:39:34 +10:00
clayjohn
5f52936350 Implement MultiMesh in 3D and flesh out MultiMesh functions 2022-06-14 21:23:20 -07:00
jfons
ba832d83b2 Initial TAA implementation
Initial TAA support based on the implementation in Spartan Engine.

Motion vectors are correctly generated for camera and mesh movement, but there is no support for other things like particles or skeleton deformations.
2022-06-07 13:14:44 +02:00
Bastiaan Olij
69b66ec425 Ensure has_os_features is safely called as it can't be called from within the construct of RenderingServerDefault on which it relies 2022-06-01 20:47:32 +10:00
clayjohn
ae64b4967c Implement NinePatchRects in GLES3 renderer 2022-05-25 16:51:40 -07:00
Rémi Verschelde
20a1b85589
Merge pull request #61425 from clayjohn/GLES3-2D 2022-05-26 01:16:52 +02:00
clayjohn
fb860265e0 Implement 2D Meshes and MultiMeshes in GLES3 backend 2022-05-25 15:46:24 -07:00
Rémi Verschelde
12ddaa36a6
Merge pull request #60641 from clayjohn/Sky-ign
Use IGN instead of white noise for sky dithering
2022-05-24 23:34:41 +02:00
clayjohn
3e20c1347d Add clipping, backbuffer, and CanvasGroups to 2D GLES3 renderer
As well as significant consequent cleanup in the RenderTarget, Texture, and Canvas renderer code
2022-05-24 11:00:34 -07:00
clayjohn
4f82b1bd20 Use IGN instead of white noise for sky dithering 2022-05-24 10:57:07 -07:00
Rémi Verschelde
1314e6cbcc
Merge pull request #60803 from Chaosus/shader_hint_rename
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-24 08:15:33 +02:00
reduz
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
clayjohn
39f1be760f Fix sky updating when DirectionalLight mode changed and shader compatibility for certain drivers 2022-05-19 17:44:38 -07:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
Yuri Rubinsky
5322b171de Fix tonemapper shader to correctly apply alpha channel 2022-05-18 06:43:07 +03:00
clayjohn
9b61c855ef Add basic lighting to GLES3 renderer.
This includes all three light types and IBL, but does not include shadows or any form of GI
2022-05-16 15:07:09 -07:00
reduz
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
Somnath Sarkar
52aeaf5d16 Fix computation of screen_uv 2022-05-16 00:00:01 -04:00
Rémi Verschelde
349aa9c884
Merge pull request #60894 from derammo/derammo_opengl3_windows 2022-05-13 15:07:13 +02:00
Rémi Verschelde
ff30a09993
Merge pull request #60643 from clayjohn/GLES3-3D 2022-05-12 21:08:02 +02:00
clayjohn
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
reduz
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
clayjohn
2bf8831dd6 SceneShader compiling 2022-05-11 21:00:21 -07:00
clayjohn
3bb8e6a9fe SkyShaders working 2022-05-11 21:00:21 -07:00
derammo
96c21bc749 opengl3 driver now works on windows including multi window
fixed and simplified gl_manager_windows
swap buffers now called for all windows
fixed missing pixel format setting in additional windows
    this makes them work in OpenGL contexts
changed verbose error printing to write once
    this error message happens very frequently while opengl3 is not finished
removed dead code no longer needed after changes
fixed comments that were misinformation
window messages during window creation now handled
    these were previously discarded
    messages now tunnel the required context
changed failure to create opengl3 window on windows to be more fatal
marked a problem with pen code
conditional compilation of vulkan and opengl3 on windows fixed
windows debug builds now show messages on debug console also
rendering driver selection box now shows only compiled drivers
marked some problematic code
thanks to akien-mga for patiently rewriting my style mistakes
2022-05-11 16:12:40 -04:00
Fabio Alessandrelli
d2bb5b88cc [GL] Fix HTML5 builds.
Safer guards for debug functions.
GL_FRAMEBUFFER_INCOMPLETE_* functions seem to be OpenGL 4.
2022-05-11 00:26:26 +02:00
bruvzg
ffe61e0895
[macOS / iOS] Fix text-to-speech build with older macOS / iOS SDK.
Add __has_include check for AVFAudio include.
Add some explicit casts to avoid conflicts.
Change all `include`s to `import`s for consistency.
2022-05-10 21:11:34 +03:00
Rémi Verschelde
9db20ccb38
Merge pull request #60596 from clayjohn/GLES3-LightStorage
Add LightStorage functions to GLES3 renderer
2022-05-10 08:18:51 +02:00
Yuri Roubinsky
a8bbe570ca Rename hint_albedo, hint_white/black in shaders 2022-05-09 22:50:18 +03:00
Rémi Verschelde
84f64ddde9
Merge pull request #60723 from reduz/refactor-module-initialization 2022-05-04 19:08:43 +02:00