Bastiaan Olij
47983e30c5
Ensure 2D MSAA resolve is performed when 3D content but no 2D content in scene
2023-11-16 13:34:34 +11:00
Alistair Leslie-Hughes
367079ffee
Renderer Viewport correct sizeof usage.
...
The current usage.
In viewport_find_from_screen_attachment
- Allocates a list of pointers, eg sizeof(RID*) * ridcount.
We need fill that buffer
viewport_owner.fill_owned_buffer(rids);
...
p_rid_buffer[idx] = _make_from_id((validator << 32) | i);
_make_from_id returns an RID object, not a pointer.
Since there isn't a copy constructor, a bitwise copy of the object occurs.
This issue will only present itself under 32bit builds.
sizeof(RID) : 8
sizeof(RID*) : 4
whereas 64bit builds they are both 8.
2023-11-16 11:02:12 +11:00
Bastiaan Olij
b1c4d4e55b
Ensure optional variants are loaded last.
2023-11-15 14:31:25 +11:00
Anutrix
3c82f4a371
Added docs for DRAW_ORDER_REVERSE_LIFETIME constant and minor XR log improvement
2023-11-11 21:17:19 +05:30
Rémi Verschelde
34e34f0945
Merge pull request #82478 from jsjtxietian/fix-AudioStreamRandomizer-random_volume_offset_db-not-working
...
Fix `AudioStreamRandomizer.random_volume_offset_db` not working
2023-11-10 21:53:45 +01:00
Rémi Verschelde
f0c52c0e35
Merge pull request #84576 from clayjohn/mesh-tangents-always
...
Create tangent array if mesh created without tangents
2023-11-08 19:09:36 +01:00
clayjohn
a74cfc2629
Use default samplers in base uniform set when rendering to reflection probes
2023-11-07 17:46:05 +01:00
clayjohn
031f221b9d
Create tangent array if mesh created without tangents
...
This extends our previous change to ensure that compressed meshes have tangents
Now we ensure tangents are always used. This greatly simplifies our compression code at the cost of a small amount of bandwidth
2023-11-07 14:24:23 +01:00
Rémi Verschelde
44a54f4500
Merge pull request #84252 from clayjohn/ensure_tangents
...
Enhance checks and user experience around tangent arrays in meshes.
2023-11-02 09:11:32 +01:00
clayjohn
d1043a5f93
Enhance checks and user experience around tangents.
...
Ensure `ensure_tangents` option actually creates tangent array. Even if it is just a dummy array.
Allow mesh to generate its own tangents when using compression. This allows users to compress meshes without tangents.
Warn users if they are trying to read from tangents without providing tangents.
2023-11-01 22:40:42 +01:00
clayjohn
be386e1876
Overhaul the SurfaceUpgradeTool
...
This defers the update to a fresh restart of the editor (to ensure we aren't mid way through loading scenes anymore.
It also ensures that the popup can't be used by multiple threads at once
Co-authored-by: Yuri Sizov <yuris@humnom.net>
2023-11-01 15:32:54 +01:00
Rémi Verschelde
2bc35308fc
Merge pull request #81494 from jsjtxietian/Fix-int-to-uint-implicit-cast-error-when-use-uniform-mat3-in-gles3
...
Fix int to uint implicit cast error when use mat3 uniform in compatibility renderer
2023-10-31 20:14:14 +01:00
Bastiaan Olij
e3b8af723e
Fix cubemap downsampler logic
2023-10-31 10:36:42 +11:00
Rémi Verschelde
93cdacbb0a
Merge pull request #84211 from clayjohn/a2c
...
Fix bug with alpha to coverage by enabling depth discard when using alpha to coverage
2023-10-30 23:24:12 +01:00
clayjohn
3f5c16dd9e
Fix multiple issues with UV compression
2023-10-30 23:11:34 +01:00
clayjohn
57ba7ded87
Fix bug with alpha to coverage by enabling depth discard when using alpha to coverage
2023-10-30 23:07:30 +01:00
jsjtxietian
967e0e6485
Fix int to uint implicit cast error when use uniform mat in gles3
2023-10-27 10:46:52 +08:00
Rémi Verschelde
2dafd06114
Merge pull request #83906 from clayjohn/GL-vertex-padding
...
Add padding to normal attribute in Compatibility renderer to match the RD renderers
2023-10-26 16:00:56 +02:00
Rémi Verschelde
bb54190253
Merge pull request #83840 from clayjohn/mesh-flat-bug
...
Ensure `r_aabb` is always used when creating surfaces through the RenderingServer
2023-10-26 16:00:32 +02:00
Rémi Verschelde
815b24d280
Merge pull request #83491 from jsjtxietian/pass-screen-size-when-render-shadow
...
Pass viewport size to shadow pass instead of using Vector2i(1,1)
2023-10-26 12:09:21 +02:00
jsjtxietian
26d32554bd
Pass viewport size to shadow pass instead of using vector2i(1,1)
2023-10-26 15:25:22 +08:00
Rémi Verschelde
9f49da24da
Merge pull request #83830 from jsjtxietian/fix-varying-assign-swizzle-check
...
Fix assign with swizzle in shader not doing varying validation check
2023-10-25 10:30:22 +02:00
Rémi Verschelde
4cc8f0f36d
Merge pull request #83649 from BastiaanOlij/no_2d_stereo
...
Skip 2D rendering if stereo enabled and fix couple of MSAA issues
2023-10-25 10:29:09 +02:00
Rémi Verschelde
9798ae3d6a
Merge pull request #82974 from mrjustaguy/Split-fix
...
Directional 2 Split Shadow Stabilization Fix
2023-10-25 10:28:21 +02:00
Rémi Verschelde
f021d33940
Merge pull request #81167 from bitsawer/fix_sdfgi_editor_change
...
Reset SDFGI when changing editor scene tabs
2023-10-25 10:27:03 +02:00
clayjohn
a88e519f18
Add padding to normal attribute in Compatibility renderer to match the RD renderers
2023-10-24 22:32:34 +02:00
Rémi Verschelde
261fe7ce6a
Merge pull request #83704 from clayjohn/misc-mesh-fixes
...
Some more fixes for compressed meshes
2023-10-24 10:54:23 +02:00
Rémi Verschelde
64f80295e5
Merge pull request #83199 from Repiteo/texture-storage-default-scale
...
Fix `TextureStorage` not assigning default scale
2023-10-24 10:53:56 +02:00
clayjohn
8f9cd4e1e3
Some more fixes for compressed meshes
...
This cleans up a few more cases of uint32_t->uint64_t
Importantly this fixes an edge case in the axis-angle compression by
using the pre-existing Basis methods instead
2023-10-24 09:38:12 +02:00
Rémi Verschelde
50d17f6b8c
Merge pull request #83613 from clayjohn/surface_upgrade_tool
...
Add an editor tool to automatically upgrade and re-save meshes
2023-10-24 00:10:37 +02:00
clayjohn
318ef8461f
Implementation of tool to automatically upgrade and re-save meshes
2023-10-23 22:39:48 +02:00
clayjohn
3c17f556ad
Ensure r_aabb is always used when creating surfaces through the RenderingServer
2023-10-23 20:36:20 +02:00
Rémi Verschelde
17aa5c5170
Merge pull request #83780 from jsjtxietian/prevent-null-variant-crash
...
Prevent `_allocate_placeholders` crash if `p_version->variants` is null
2023-10-23 12:42:04 +02:00
Rémi Verschelde
814de86494
Merge pull request #83493 from clayjohn/light-pair-bug
...
Ensure that only visible paired lights are used
2023-10-23 12:40:07 +02:00
jsjtxietian
089e7f473d
Fix assign with swizzle in shader not doing varying validation check
2023-10-23 17:52:50 +08:00
jsjtxietian
5f85a042b6
Prevent `_allocate_placeholders` crash if `p_version->variants` is null
2023-10-22 23:19:00 +08:00
Hugo Locurcio
0012478ecb
Add property hint for 2D shadow size project setting
...
Previously, it was possible to use zero or negative values, which are
invalid.
This also prevents crashing the engine by setting a shadow size of
0 or lower from a script.
2023-10-22 00:28:19 +02:00
Rémi Verschelde
2a995c09ac
Merge pull request #83639 from stoofin/frustum-buffer-size
...
Fix shadow map debug visualization camera frustum index buffer size
2023-10-20 15:12:34 +02:00
Bastiaan Olij
425e943576
Skip 2D rendering if stereo enabled and fix MSAA2D with 3D issue.
2023-10-20 14:02:55 +11:00
stoofin
1a2b66d4fc
Fix shadow debug frustum index buffer size
2023-10-19 13:48:11 -07:00
Dario
4890e96556
Add an extra backbuffer color texture that can be used when an upscaler is in use.
...
Fixes issue #83152 . Due to how BLUR_0 is reused for multiple purposes and requires being at native resolution for some post-processing effects to work, FSR2 will use an alternate texture at internal size to use as the screen texture read by shaders instead. The rendering pipeline will prefer using this texture if it exists.
2023-10-17 13:36:27 -03:00
Clay
623a050269
Ensure that only visible paired lights are used
...
This is a longstanding issue in both the Mobile and GL Compatibility renderer.
Meshes pair with all lights that touch them, and then at draw time, we send all paired lights indices to the shader (even if that light isn't visible). The problem is that non-visible lights aren't uploaded to the GPU and don't have an index. So we end up using a bogus index
2023-10-17 13:02:46 +02:00
Rémi Verschelde
842c1cafc0
Merge pull request #83400 from bitsawer/fix_mobile_instance_uniforms
...
Fix Mobile renderer shader instance uniform access
2023-10-16 10:42:38 +02:00
bitsawer
f0a178cbdb
Fix Mobile renderer shader instance uniform access
2023-10-15 18:09:54 +03:00
Lunarisnia
28f7a62ae4
Fix disabling depth prepass breaks opaque material
2023-10-15 12:18:13 +07:00
jsjtxietian
34eba41aea
Fix AudioStreamRandomizer.random_volume_offset_db not working
2023-10-14 10:52:27 +08:00
Rémi Verschelde
135fa1ef5d
Merge pull request #83179 from clayjohn/tangents-sanitize
...
Sanitize tangents when creating mesh surfaces to avoid triggering the compressed mesh path in the shader
2023-10-13 22:17:02 +02:00
clayjohn
e3d31837eb
Sanitize tangents when creating mesh surfaces to avoid triggering the compressed mesh path in the shader
2023-10-13 08:54:49 -06:00
bruvzg
9a1e0e4aef
[Bitmap fonts] Add support for scaling.
2023-10-13 12:57:45 +03:00
Clay
acb65377cd
Cleanup instances of using uint32_t for mesh formats
...
And tidy up some leftovers from the attribute compression PR
2023-10-12 22:01:41 +02:00
Thaddeus Crews
9ee41c707e
Fix texture storage not assigning default scale
...
• Print errors if an invalid value is passed
2023-10-12 12:02:24 -05:00
Rémi Verschelde
b1371806ad
Merge pull request #82431 from bitsawer/fix_gpuparticles_free
...
Fix errors when freeing GPUParticles
2023-10-12 00:22:33 +02:00
Rémi Verschelde
09b92a144d
Merge pull request #79921 from mandryskowski/ssr_transparency
...
Make Fresnel darken SSR instead of blending with specular
2023-10-11 22:37:02 +02:00
mandryskowski
5b2e54c17b
Fresnel should darken the SSR reflections instead of blending them with specular light.
2023-10-11 18:58:22 +01:00
kobewi
41fa6c32b4
Disable update spinner when debug redraw is active
2023-10-11 13:21:29 +02:00
Rémi Verschelde
4b7cc99bc1
Merge pull request #79169 from reduz/debug-canvas-item-redraw
...
Debug CanvasItem redraw
2023-10-11 08:40:05 +02:00
Rémi Verschelde
55282ddc10
Merge pull request #79527 from QbieShay/qbe/particles-rework
...
Particle internal refactor and additions for more artistic control
2023-10-10 22:48:50 +02:00
QbieShay
c228fe1a0d
Particle internal refactor and additions for more artistic control
...
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Co-authored-by: Mew Pur Pur <85438892+MewPurPur@users.noreply.github.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2023-10-10 20:03:35 +02:00
Rémi Verschelde
3d4724b381
Merge pull request #83056 from AThousandShips/surface_fix
...
Fix incorrect check in `_dict_to_surf`
2023-10-09 23:25:16 +02:00
Rémi Verschelde
b4214b1686
Merge pull request #83004 from Chaosus/shader_language_fix_typo
...
Fix typo in `shader_language.cpp`
2023-10-09 23:23:35 +02:00
A Thousand Ships
7b6621297b
Fix incorrect check in `_dict_to_surf`
2023-10-09 18:28:59 +02:00
Rémi Verschelde
a1d7c62df7
Merge pull request #83003 from AThousandShips/null_check_extra
...
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-09 15:37:14 +02:00
Rémi Verschelde
336260b7b3
Merge pull request #83002 from AThousandShips/safety_check
...
Replace `sanity` with `safety` for checks
2023-10-09 15:36:49 +02:00
Rémi Verschelde
35ede42d1d
Merge pull request #82695 from maiself/object-less-callables-fixes
...
Fixes to allow object-less callables throughout Godot
2023-10-09 15:32:38 +02:00
Yuri Rubinsky
f4bc779c4e
Fix typo in `shader_language.cpp`
2023-10-08 18:55:40 +03:00
A Thousand Ships
f18aa00e85
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-08 17:23:33 +02:00
A Thousand Ships
034c0f1624
Replace `sanity` with `safety` for checks
2023-10-08 16:22:24 +02:00
mrjustaguy
45948dc2c9
Directional 2 Split Shadow Stabilization Fix
2023-10-07 17:55:26 +02:00
Mai Lavelle
5e15586ec2
Fixes to allow object-less callables throughout Godot
...
This fixes #81887
2023-10-06 16:31:35 -04:00
Rémi Verschelde
c05f521e16
Merge pull request #82892 from clayjohn/tangent-binormal-transform
...
Only perform modelview transform on tangent and binormal when vertex shader is in local space
2023-10-06 12:53:05 +02:00
clayjohn
af1d81d95a
Only perform modelview transform on tangent and binormal when vertex shader is in local space
2023-10-05 22:08:36 -06:00
clayjohn
04846c1d6d
Avoid default fallback material when using world_vertex_coords
...
This avoids z-fighting between the opaque shader and the depth prepass shader
2023-10-05 19:11:48 -06:00
Rémi Verschelde
f2ba8ec6ca
Merge pull request #81124 from bitsawer/fix_voxelgi_static_lights
...
Fix VoxelGI static light pairing
2023-10-06 00:24:29 +02:00
Rémi Verschelde
d351d40e29
Merge pull request #82877 from tomissj2/master
...
Fog shader: Fix undeclared identifier `global_variables`
2023-10-05 22:51:48 +02:00
Rémi Verschelde
950139e489
Merge pull request #82546 from viksl/volumetric-fog-spot-light-artifacts
...
Fix cluster artifacts and negative light
2023-10-05 22:50:12 +02:00
Rémi Verschelde
f02695cc04
Merge pull request #81138 from clayjohn/attribute-compression
...
Vertex and attribute compression
2023-10-05 22:48:55 +02:00
Rémi Verschelde
7ee2eb5c92
Merge pull request #80992 from viksl/volumetric-fog-NaN-issues
...
Fix volumetric fog NaN values in textures from starting at a zero Vector2.
2023-10-05 22:48:31 +02:00
tomissj2
e906eb8433
Fog Shader bugfix: 'global_variables' : undeclared identifier
...
If user try to use a global shader variable in a fog type shader we are getting shader error. The reason of this there is a typo in the fog.cpp. I other well working shaders types like sky the "action.global_buffer_array_variable" is "global_shader_uniforms.data".
The investigation tracked here:
https://discord.com/channels/212250894228652034/1158918161337434172
2023-10-05 22:12:50 +02:00
clayjohn
51ed3aef63
Vertex and attribute compression to reduce the size of the vertex format.
...
This allows Godot to automatically compress meshes to save a lot of bandwidth.
In general, this requires no interaction from the user and should result in
no noticable quality loss.
This scheme is not backwards compatible, so we have provided an upgrade
mechanism, and a mesh versioning mechanism.
Existing meshes can still be used as a result, but users can get a
performance boost by reimporting assets.
2023-10-05 12:02:23 -06:00
kobewi
09b30be86d
Add vararg call() method to C++ Callable
2023-10-05 11:35:29 +02:00
Rémi Verschelde
829d9bb6ba
Merge pull request #82451 from DarioSamo/mesh-storage-vertex-array-taa-fix
...
Fix mismatch between surface vertex array generation inside the function and the caller.
2023-10-05 10:08:34 +02:00
Rémi Verschelde
c255acebe8
Merge pull request #81607 from Rindbee/fix-UPDATE_WHEN_VISIBLE-not-work-in-exported-project
...
Fix `SubViewport` with `UPDATE_WHEN_VISIBLE` not working properly in exported project
2023-10-05 10:07:16 +02:00
Rémi Verschelde
ccbb91137f
Merge pull request #82766 from BastiaanOlij/fix_debanding_issue
...
Forgot to add debanding to config object
2023-10-04 15:45:39 +02:00
Rémi Verschelde
03ff9fedb6
Merge pull request #82101 from bruvzg/x11_gles
...
[X11] Add support for using EGL/GLES instead of GLX.
2023-10-04 15:35:05 +02:00
Rémi Verschelde
d5db0e5032
Merge pull request #81218 from bruvzg/_temp_fs
...
[Native File Dialogs] Improve filter list handling, add selected filter to the callback.
2023-10-04 15:34:16 +02:00
Rémi Verschelde
5680d729f2
Merge pull request #80939 from RandomShaper/fix_onion
...
Revive onion skinning
2023-10-04 15:33:25 +02:00
bruvzg
af00c4a54a
[X11] Add support for using EGL/GLES instead of GLX.
2023-10-04 14:15:36 +03:00
bruvzg
d1aaa914f3
[macOS] Add `about_to_open` and `popup_hide` callback for the global menus, move part of logic to the PopupMenu to allow live menu modification.
2023-10-04 09:49:51 +03:00
Bastiaan Olij
480fe5767e
Forgot to add debanding to config object
2023-10-04 16:24:09 +11:00
bruvzg
43e4708dff
[Native File Dialogs] Improve filter list handling, add selected filter to the callback.
2023-10-03 19:26:16 +03:00
Rémi Verschelde
9af1983af2
Merge pull request #82475 from bruvzg/ts_spacing_var
...
[TextServer] Store font extra spacing variations without making a full copy of font.
2023-10-03 17:23:43 +02:00
Rémi Verschelde
24c166dfe2
Merge pull request #81619 from Chaosus/fix_shader_const
...
Re-allows constants in global space to be initialized with function call
2023-10-03 17:20:23 +02:00
bruvzg
72e2e47059
[DisplayServer] Add method to estimate window title bar size.
2023-10-03 16:13:52 +03:00
Pedro J. Estébanez
77d8372285
Fix drawing of viewports without swapping buffers
2023-10-03 13:51:47 +02:00
viksl
8a2d345a85
Fixes spotlight's cluster artifacts and negative light.
2023-10-01 09:13:30 +02:00
Rémi Verschelde
44e399ed5f
Merge pull request #82534 from DarioSamo/fsr2-exposure-fix
...
Use internal texture at internal resolution for calculating luminance (FSR2).
2023-09-29 19:47:53 +02:00
Dario
1e2c28b7fe
Use internal texture at internal resolution for calculating luminance.
...
Fixes an error where the exposure was calculated incorrectly if a lower resolution scale was used while using FSR2. Now the behavior is consistent regardless of the resolution scale.
2023-09-29 13:41:40 -03:00
Hugo Locurcio
d6d640f158
Disable `lightmapper_rd` module in non-editor builds (and in Android editor)
...
This is consistent with `xatlas_unwrap`, which isn't enabled in non-editor
builds and the Android editor either. There is currently no way to
use the lightmapper in a non-editor build anyway, as it doesn't expose
any methods (and even if there was, there would be no way to perform
UV2 unwrapping in the exported project).
This reduces binary size of a stripped Linux x86_64 export template
build by ~164 KB.
This also moves the PrimitiveMesh texel size project setting
so that it's defined when the module is disabled,
and adds a property hint to it.
2023-09-29 11:30:15 +02:00
Yuri Sizov
7ae0fa1083
Merge pull request #77496 from clayjohn/GLES3-shadows
...
Implement 3D shadows in the GL Compatibility renderer
2023-09-28 20:03:53 +02:00
bruvzg
4a167fc740
[TextServer] Store font extra spacing variations without making a full copy of font.
2023-09-28 10:45:09 +03:00