Commit graph

1392 commits

Author SHA1 Message Date
Bastiaan Olij
d2d22748b4 Fix issue in shadow to opacity 2024-04-26 21:54:26 +10:00
Rémi Verschelde
853740e2ad
Merge pull request #91191 from clayjohn/RD-soft-shadows
Properly calculate penumbra for soft shadows with reverse z
2024-04-26 11:09:02 +02:00
Rémi Verschelde
22c8a2785d
Merge pull request #90920 from clayjohn/2D-light-cull
Exit light calculation early when pixel outside of light bounding rectangle
2024-04-26 11:08:29 +02:00
clayjohn
4e5e81c7d4 Properly calculate penumbra for soft shadows with reverse z
Also fix a related bug where the DirectionalLight3D size was ignored unless a positional light with soft shadows touched the mesh
2024-04-25 17:06:49 -07:00
Rob Blanckaert
ffe0b869f5 Add LIGHT_VERTEX to fragment shader
Adds a new variable to the fragment shader to specify
the vertex position used when calculating lighting.
2024-04-25 06:56:02 -07:00
Rémi Verschelde
a754bbc565
Merge pull request #91059 from BastiaanOlij/fix_multiview_copy
Fix issue with copy shader not working in multiview
2024-04-23 19:12:24 +02:00
Bastiaan Olij
226ca2f04c Fix issue with copy shader not working in multiview 2024-04-23 21:46:39 +10:00
cosparks
6d0dca76c0 Fixes SDF Collision Enable/Disable
- sets LightOccluderInstance field when sdf collision is updated
- adds check for light occluder sdf_collision field in 2d renderers
2024-04-22 20:27:56 -07:00
clayjohn
506e93a207 Exit light calculation early when pixel outside of light bounding rectangle
This hugely improves the performance of rendering PointLight2Ds
2024-04-19 16:10:11 -07:00
Rémi Verschelde
993d15da17
Merge pull request #90821 from clayjohn/RD-clip-children-rect
Use a src rect for copying from screen with CanvasGroup in the mobile backend
2024-04-19 16:27:41 +02:00
clayjohn
eb62c5b27f Revert change to default depth clear value in draw_list_begin 2024-04-17 19:08:22 -07:00
clayjohn
adfc9ccc44 Use a src rect for copying from screen with CanvasGroup in the mobile backend 2024-04-17 15:19:20 -07:00
Oxi
1815871b90 Fixed unshaded mode lightmaps 2024-04-17 10:38:54 +01:00
Juan Linietsky
65686dedf9 Use WorkerThreadPool for Server threads
* Servers now use WorkerThreadPool for background computation.
* This helps keep the number of threads used fixed at all times.
* It also ensures everything works on HTML5 with threads.
* And makes it easier to support disabling threads for also HTML5.

CommandQueueMT now syncs with the servers via the WorkerThreadPool
yielding mechanism, which makes its classic main sync semaphore
superfluous.

Also, some warnings about calls that kill performance when using
threaded rendering are removed because there's a mechanism that
warns about that in a more general fashion.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2024-04-10 18:47:42 +02:00
Rémi Verschelde
5c75fa260f
Merge pull request #90458 from clayjohn/RD-weight-buffer
Clear RIDs of weight buffers when freeing to avoid double free
2024-04-10 14:22:37 +02:00
Rémi Verschelde
c59f493620
Merge pull request #89729 from jitspoe/master.shadow_distance_fade_optimization
Shadow fade for omni lights actually stops the shadow from updating while faded out to improve performance.
2024-04-10 14:21:56 +02:00
clayjohn
bafbde9f4b Clear RIDs of weight buffers when freeing to avoid double free 2024-04-09 17:52:05 -07:00
Rémi Verschelde
10d67e590d
Merge pull request #90191 from BastiaanOlij/fix_mobile_canvas_copy
Don't use subpasses when we're using Canvas background mode in Mobile
2024-04-06 13:06:37 +02:00
Rémi Verschelde
64c4a53a2c
Merge pull request #89849 from EIREXE/cute_and_funny_decals
Fix decal modulate being passed as srgb instead of as linear color.
2024-04-04 14:31:53 +02:00
Rémi Verschelde
a28be933ee
Merge pull request #89398 from clayjohn/visual-debugger-coverage
Increase coverage of timestamps for visual profiler
2024-04-04 14:31:19 +02:00
Khasehemwy
d950f5f838
Use Reverse Z for the depth buffer 2024-04-04 13:54:15 +02:00
Bastiaan Olij
9e9a6fb6d6 Can't use subpasses when we're using Canvas background mode in Mobile 2024-04-04 15:59:11 +11:00
clayjohn
ac6c648645 Increase coverage of timestamps for visual profiler 2024-04-03 19:29:02 -07:00
Rémi Verschelde
2597f60de1
Merge pull request #88830 from beiller/bugfix/taa_xr_fix
Add fix for TAA passes rendering black meshes on XR
2024-03-26 13:45:10 +01:00
jitspoe
a0969a0931 Shadow fade for omni lights actually stops the shadow from updating while faded out to improve performance. 2024-03-25 21:25:56 -04:00
Álex Román Núñez
2f0ba1ed3f Fix decal modulate being passed as srgb instead of as linear color. 2024-03-24 14:59:43 +01:00
Rémi Verschelde
70c05f63da
Merge pull request #89531 from sullyscience/fix-resource-leaks
Fix mobile renderer RID leaks
2024-03-24 01:16:48 +01:00
Rémi Verschelde
cd4e4c0fcc
Merge pull request #89111 from AThousandShips/vec_use
Use `Vector*` component-wise `min/max/clamp` functions where applicable
2024-03-24 01:14:51 +01:00
Ricardo Buring
2ed2ccc2d8 Fixed Timestep Interpolation (2D)
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-03-23 12:28:36 +01:00
A Thousand Ships
79ba22a73f
Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
David Sullivan
dfa326ef55 Fix: Address mobile resource leaks in render
Update render_forward_mobile destructor to include instance buffers.
Update render_scene_buffers_rd cleanup to include weight buffers / blur
textures.
2024-03-15 14:48:12 -04:00
Rémi Verschelde
3e79cdbee2
Merge pull request #89450 from RandomShaper/fix_inside_lights
Fix missed light clusters when inside clipped lights
2024-03-14 22:34:56 +01:00
Pedro J. Estébanez
605fdb655c Fix missed light clusters when inside clipped lights 2024-03-13 23:38:46 +01:00
Aaron Franke
9e0b38ecd3 Disable XR server when compiling without 3D 2024-03-13 09:02:10 -07:00
Bastiaan Olij
df8ff797b7 Consistantly use USE_MULTIVIEW as the define in shaders 2024-03-11 14:40:00 +11:00
Rémi Verschelde
f8140a4e9a
Merge pull request #89253 from Calinou/debug-draw-modes-ignore-decals-2
Make Overdraw, Lighting and Shadow Splits debug draw modes ignore decals
2024-03-08 13:09:40 +01:00
Rémi Verschelde
cebaf9dac5
Merge pull request #89042 from permelin/fix-particle-trail-activation
Fix early activation of particle trail sections
2024-03-08 13:09:25 +01:00
Hugo Locurcio
26a220bd31
Make Overdraw, Lighting and Shadow Splits debug draw modes ignore decals
This also makes the Overdraw and Shadow Splits debug draw modes ignore fog.
The Lighting debug draw mode still displays fog as that debug draw mode
is intended to preview scene lighting, and fog has an impact on how
lighting is perceived.
2024-03-07 17:40:49 +01:00
Rémi Verschelde
a52e575652
Merge pull request #89134 from BastiaanOlij/fix_recursive_reflection_probes
Fix never ending loop with overlapping probes
2024-03-05 09:56:05 +01:00
Bastiaan Olij
a5d3d23db4 Fix never ending loop with overlapping probes 2024-03-05 10:07:56 +11:00
Rémi Verschelde
3be5d9b01a
Merge pull request #89046 from permelin/fix-particle-aabb-recalc-with-userdata
Fix error in AABB calculation for particles with USERDATA
2024-03-04 13:33:33 +01:00
markdibarry
a62870956a Add new Parallax2D node 2024-03-03 15:46:40 -05:00
Per Melin
853935a5c9 Fix error in AABB calculation for particles with USERDATA
Selecting "Generate AABB" on a 3D particle node in the editor would not work
and printed an error about incorrect buffer size if the particle shader used
one or more of the USERDATA build-ins.
2024-03-02 14:26:09 +01:00
Per Melin
9b2d77a238 Initialize particle trail history frame numbers
Fixes #88712

All particle trail sections were activated at once on the first cycle, instead
of being spread out over the trail's lifetime.
2024-03-01 19:32:43 +01:00
bitsawer
89d772a799
Fix Volumetric Fog VoxelGI updates 2024-03-01 14:47:15 +01:00
Bill
b44f1c5176 Add fix for TAA passes rendering black meshes on XR 2024-02-25 14:25:49 -05:00
Robert Yevdokimov
13e82094ee Remove word duplicates in comments and strings, and fix casing and punctuation 2024-02-23 17:28:28 -05:00
clayjohn
2657593462 Use barriers between all blur passes with SSAO and SSIL 2024-02-21 14:35:20 -08:00
Rémi Verschelde
292f4c7f97
Merge pull request #80214 from BastiaanOlij/rendering_effect
Implement hooks into renderer
2024-02-20 23:59:27 +01:00
Arman Elgudzhyan
533eab89ab Fixed reversed custom AABB null check when recalculating multimesh AABBs 2024-02-18 12:07:23 -08:00