1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00
Commit Graph

366 Commits

Author SHA1 Message Date
devloglogan
36128bfc29 Check render target validity before getting motion vector texture in mobile renderer 2025-06-13 18:52:02 -05:00
Rémi Verschelde
da05a6b775 Merge pull request #106907 from SpockBauru/fix-mobile-lightmap-instances
Vulkan Mobile: Fix lightmap instances count
2025-06-12 11:56:32 +02:00
Rémi Verschelde
0497ae9947 Merge pull request #80710 from apples/7174-apples-stencil
Add stencil support to spatial materials
2025-06-12 01:15:35 +02:00
Apples
d674c9e289 Add stencil support for spatial materials 2025-06-11 09:59:10 -05:00
SpockBauru
fe1d499aa4 Mobile: Fix lightmap instances count 2025-06-09 17:58:17 -03:00
Dario
46277836a6 Optimize Mobile renderer by using FP16 explicitly. 2025-06-09 14:39:35 -03:00
Apples
7574a5dbb3 Add depth function for spatial materials 2025-06-06 09:21:19 -05:00
devloglogan
3b70fbdc3c Implement motion vectors in mobile renderer 2025-05-30 13:09:54 -05:00
Dario
5a30a7e7cd Add shader baker to project exporter.
Metal Support contributed by Migeran (https://migeran.com) and Stuart Carnie.

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: Gergely Kis <gergely.kis@migeran.com>
2025-05-27 12:45:27 -03:00
Thaddeus Crews
e89c4b0f9f Merge pull request #102330 from RGDTAB/add_partial_smaa
Add SMAA 1x to screenspace AA options
2025-05-26 11:24:35 -05:00
BlueCube3310
546b40eee2 Mobile: Move _setup_lightmaps before _fill_render_list 2025-05-23 14:28:45 +02:00
Raymond DiDonato
6b99608950 Add SMAA 1x 2025-05-21 15:02:09 -04:00
clayjohn
9a1def8da1 Add new StandardMaterial properties to allow users to control FPS-style objects (hands, weapons, tools close to the camera)
Add new shader built in Z_CLIP_SCALE to easily adjust clipping distance to avoid clipping walls etc.

Add fov_override to StandardMaterial3D to easily have a custom FOV for FPS objects

Add IN_SHADOW_PASS built-in to shaders for tweaking materials without impacting shadow maps
2025-05-21 10:16:05 -03:00
Thaddeus Crews
a12e9d5c31 Merge pull request #106493 from DarioSamo/mobile-scs-permutations
Reduce amount of permutations in mobile shader.
2025-05-20 11:37:26 -05:00
BlueCube3310
67a2c69c78 Mobile: Disable subpass post-processing when using FXAA 2025-05-20 13:21:59 +02:00
Dario
ff3ababb09 Reduce amount of permutations in mobile shader. 2025-05-16 12:40:21 -03:00
Capry
9828c365c3 Add support for bent normals for indirect lighting and specular occlusion 2025-05-12 12:52:04 +02:00
landervr
56730d0cb2 Add specular occlusion from ambient light
Co-authored-by: guerro323 <kaltobattle@gmail.com>
2025-05-08 23:52:01 +02:00
Thaddeus Crews
3947cbe3b2 Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
Thaddeus Crews
98aced4e65 Merge pull request #99768 from dsnopek/openxr-vulkan-foveated-rendering
OpenXR: Use the `XR_FB_foveation_vulkan` extension to get the density map for VRS
2025-04-17 09:14:23 -05:00
Thaddeus Crews
ad40939b6f Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews
448f159c69 Merge pull request #105267 from clayjohn/rd-mobile-pipelines
Pre-allocate more resources when screen textures are detected in the Mobile renderer
2025-04-14 19:39:48 -05:00
clayjohn
699695e5ff Preallocate more resources when screen textures are detected in the Mobile renderer
This further reduces stutter when the screen texture suddenly becomes visible
2025-04-11 12:31:17 -07:00
Thaddeus Crews
c7e9dc96a4 Rendering: Fix Math constant conversion 2025-04-11 12:33:57 -05:00
Thaddeus Crews
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
Thaddeus Crews
06c71fbf40 Merge pull request #105175 from clayjohn/RD-pipeline-sss-roughness
Detect more pipeline settings at load time to avoid pipeline stutters
2025-04-10 11:10:22 -05:00
clayjohn
bf47c42b21 Detect possible usage of SSS and screen textures at load time to allocate needed resources at load time.
This allows us to avoid a class of pipeline compilation stutters and
stutters from allocating screen textures.
2025-04-09 13:31:03 -07:00
David Snopek
79f5a4d9fe OpenXR: Use the XR_FB_foveation_vulkan extension to get the density map for VRS 2025-03-31 07:21:58 -05:00
Rémi Verschelde
408d07109b Merge pull request #99551 from DarioSamo/fragment-density-map
Implement Fragment density map support.
2025-03-28 14:31:19 +01:00
Dario
76d709be74 Implement support for fragment density maps.
Co-Authored-By: Bastiaan Olij <mux213@gmail.com>
2025-03-24 11:50:04 -05:00
Thaddeus Crews
0fb0804546 Merge pull request #103641 from darksylinc/matias-mobile-shadows-update
Fix inefficient upload in Mobile Shadows
2025-03-11 09:35:05 -05:00
Thaddeus Crews
dfdb5359ea Merge pull request #103547 from clayjohn/forward-plus_instance_data_optimize
Optimize `_fill_instance_data` function in Forward+ renderer.
2025-03-09 09:05:19 -05:00
clayjohn
5efcd64b23 Reduce per-frame memory allocations from the heap in the Mobile renderer. 2025-03-07 22:01:24 -08:00
clayjohn
574f5126a2 Optimize _fill_instance_data function in Forward+ and Mobile renderers.
This batches together a couple of micro-optimizations that were discovered in profiling and analyzing disassembly.

Importantly, this reduces the amount of instructions in a heavy loop. This has the biggest impact when there are lots of objects and lights in the scene as the function is called once per objects + once per light that touches the object
2025-03-07 15:44:53 -08:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
Thaddeus Crews
b6ece17de1 Merge pull request #103529 from clayjohn/RD-trivial-instance-data
Validate triviality of InstanceData struct in Mobile and Forward+ renderers
2025-03-06 16:36:14 -06:00
Matias N. Goldberg
e605ad93c7 Fix inefficient upload in Mobile Shadows
Clustered performs the following shadow rendering steps

1. Process objects [0; 10) for cascade 0.
2. Process objects [10; 30) for cascade 1.
3. Process objects [30; 100) for cascade 2.
4. Upload objects [0; 100) to GPU.
5. Draw all cascades.

Mobile was supposed to be doing the same, but instead was doing:

1. Process objects [0; 10) for cascade 0.
2. Upload objects [0; 10) to GPU.
3. Process objects [10; 30) for cascade 1.
4. Upload objects [0; 30) to GPU.
5. Process objects [30; 100) for cascade 2.
6. Upload objects [0; 100) to GPU.
7. Draw all cascades.

That is, always reuploaded everything from scratch.
Therefore it pointlessly (and with geometric growth) wasted BW.
2025-03-05 15:21:25 -03:00
Thaddeus Crews
729c4e9e88 Merge pull request #102905 from kleonc/render_info_fix_primitive_count_per_triangle_strip
Fix render info primitive count per `TRIANGLE_STRIP`
2025-03-05 12:07:47 -06:00
Matias N. Goldberg
62c1a4782d Fix inefficient upload in Mobile Shadows
Clustered performs the following shadow rendering steps

1. Process objects [0; 10) for cascade 0.
2. Process objects [10; 30) for cascade 1.
3. Process objects [30; 100) for cascade 2.
4. Upload objects [0; 100) to GPU.
5. Draw all cascades.

Mobile was supposed to be doing the same, but instead was doing:

1. Process objects [0; 10) for cascade 0.
2. Upload objects [0; 10) to GPU.
3. Process objects [10; 30) for cascade 1.
4. Upload objects [0; 30) to GPU.
5. Process objects [30; 100) for cascade 2.
6. Upload objects [0; 100) to GPU.
7. Draw all cascades.

That is, always reuploaded everything from scratch.
Therefore it pointlessly (and with geometric growth) wasted BW.
2025-03-03 19:57:27 -03:00
clayjohn
1bdb3bc88a Validate triviality of the InstanceData and RenderElementInfo structs in Mobile and Forward+ renderers.
This is needed to avoid overhead that results from calling the constructor during calls to LocalVector.resize()
2025-03-03 14:38:37 -08:00
kleonc
b691a997a3 Fix render info primitive count per TRIANGLE_STRIP 2025-02-15 23:50:07 +01:00
clayjohn
7444839299 Reduce mobile pipeline compilations by tracking more feature usage globally and only compile what is needed 2025-02-05 18:27:23 -08:00
Dario
d0c29faa15 Mark pipeline compilation of ubershaders as high priority. 2025-01-28 11:40:05 -03:00
Matias N. Goldberg
7b2f1e1d09 Fix union order to simplify empty initializers
This is a followup to PR #101344 (commit
0e06eb80bc).

Some of them were not an issue because Godot was initializing all
members, but they were "fixed" just in case since it could become a
problem in the future.

Valgrind was specifically complaining about HashMapData &
GlobalPipelineData.
2025-01-14 19:05:01 -03:00
David House
e6daec9cf8 Added indirect drawing functionality to MultiMesh
Update doc/classes/RenderingServer.xml

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
2025-01-13 14:51:51 -06:00
Rémi Verschelde
3014eec40d Merge pull request #99407 from devloglogan/rec-resolution
Allow using custom `Rect2i` for rendering with OpenXR
2025-01-10 23:05:46 +01:00
devloglogan
e7f6b7ea0b Allow using custom Rect2i for rendering with OpenXR 2025-01-09 09:46:15 -06:00
Dario
0e06eb80bc Fix union order to simplify empty initializers. 2025-01-09 10:39:13 -03:00
Rémi Verschelde
084da581be Merge pull request #100241 from lander-vr/reflection-probe-priority
Add priority-based blending to reflection probes.
2025-01-07 10:14:38 +01:00
landervr
1637736c20 ReflectionProbe priority 2024-12-23 21:58:11 +01:00