Commit Graph

532 Commits

Author SHA1 Message Date
21ffbecfa9 Resolve depth buffer in pass if supported by driver 2025-11-17 17:29:38 +11:00
c6fe923e33 Merge pull request #108516 from KoBeWi/file_graveyard
Remove unnecessary cpp files after cleanup
2025-11-14 14:23:06 -06:00
3c1e479290 Merge pull request #110077 from clayjohn/mobile-glow
Overhaul and optimize Glow in the mobile renderer
2025-10-31 09:23:32 -05:00
2e59cb41f4 Optimize glow and tonemap gather step in the mobile renderer
Mobile devices are typically bandwidth bound which means we need to do as few texture samples as possible.

They typically use TBDR GPUs which means that all rendering takes place on special optimized tiles. As a side effect, reading back memory from tile to VRAM is really slow, especially on Mali devices.

This commit uses a technique where you do a small blur while downsampling, and then another small blur while upsampling to get really high quality glow. While this doesn't reduce the renderpass count very much, it does reduce the texture read bandwidth by almost 10 times. Overall glow was more texture-read bound than memory write, bound, so this was a huge win.

A side effect of this new technique is that we can gather the glow as we upsample instead of gathering the glow in the final tonemap pass. Doing so allows us to significantly reduce the cost of the tonemap pass as well.
2025-10-30 21:56:26 -07:00
ca0eb5da24 OpenXR: Fix resizing viewports used by OpenXRCompositionLayer 2025-10-30 17:40:52 -05:00
230adb7511 Add Persistent Buffers
This work is a heavily refactored and rewritten from TheForge's initial
code.

TheForge's original code had too many race conditions and was
fundamentally flawed as it was too easy to incur into those data races
by accident.

However they identified the proper places that needed changes, and the
idea was sound. I used their work as a blueprint to design this work.

This PR implements:

 - Introduction of UMA buffers used by a few buffers
(most notably the ones filled by _fill_instance_data).

Ironically this change seems to positively affect PC more than it does
on Mobile.

Updates D3D12 Memory Allocator to get GPU_UPLOAD heap support.

Metal implementation by Stuart Carnie.

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: TheForge team
2025-10-24 08:16:19 +11:00
f61ee7bdf6 Use half float precision buffer for 3D when HDR2D is enabled
This is necessary for Environment effects like Glow to work correctly.
2025-10-21 13:44:46 -07:00
ba268416d5 Push pipeline compilation of various effects to the worker thread pool. 2025-10-13 12:00:23 -03:00
8150cb9200 Merge pull request #111403 from AeioMuch/fix_double_precision_wrong_indexes
Fix wrong indices used for transform & UBO matrix for double precision build
2025-10-10 10:25:59 -05:00
dae2122388 Fix wrong indexes for double precision 2025-10-09 22:01:41 +02:00
f2d0ea6d40 Ensure reflection atlas is valid before rendering 2025-10-07 22:05:22 -07:00
fdc235f496 Merge pull request #110884 from Kaleb-Reid/fix-spotlight-aabb
Use correct AABB for SpotLight3Ds when `spot_angle > 90`
2025-10-06 14:34:05 -05:00
91167c3c23 Use correct AABB for SpotLight3Ds when spot_angle > 90 2025-10-04 02:12:51 -07:00
2b7f39ea28 Merge pull request #110505 from Calinou/tweak-draw-command-labels
Tweak draw command label names for consistency
2025-09-30 20:10:37 -05:00
9fbf5808a0 Rename server "free" functions to "free_rid" to match exposed API 2025-09-30 16:52:25 -07:00
f9694033a5 Merge pull request #107923 from clayjohn/RD-mat3x4
Use Mat3x4 for model and view transforms to save bandwidth and ALUs
2025-09-30 18:34:59 -05:00
aa8bc0b56d Prompt editor restart when reflection probe size is updated
Also formally deprecate the RS function for updating an individual probes size. The functionality was removed in 4.0, but the function itself was mistakenly left exposed.
2025-09-29 18:35:34 -07:00
14b60f2264 Optimize vertex shader using mat3x4 to reduce bandwidth, load/store operations and ALUs 2025-09-26 23:20:08 -07:00
7b8073d122 Merge pull request #107763 from Ivorforce/missing-vpv
Add missing `vpv.push_back(pv);` in `render_target_get_sdf_texture`.
2025-09-24 09:59:11 -05:00
cd3a6c88fd Merge pull request #106200 from BlueCube3310/image-16-u16
Image: Implement 16-bit unorm and uint formats
2025-09-23 12:08:46 -05:00
e721af5775 Merge pull request #110330 from DarioSamo/reflection-probe-size-leak
Fix reflection probes not recreating downsampled textures when mode changes.
2025-09-17 11:34:12 -05:00
853884ba05 Merge pull request #109143 from sievaxx/more_sampler_default_texs
Add and enable default textures for other samplers
2025-09-16 11:44:51 -05:00
204e310914 Tweak draw command label names for consistency
- Use Title Case for all labels, and add hyphens where relevant.
- Mention Roughness in SSR Filter's label name, as it's only enabled
  when the SSR roughness quality is not set to Disabled.
2025-09-14 01:23:47 +02:00
7b923609c2 Fix reflection probes not recreating downsampled textures when mode changes. 2025-09-08 15:54:37 -03:00
b0d7a241b2 Handle the case where VRS is a two byte per pixel format when creating default VRS texture 2025-08-26 12:22:23 -07:00
919006eb35 Fix material removal clearing all instances of shared texture arrays 2025-08-18 12:21:15 +02:00
c8b5982d0f Metal: Ensure correct output texture format selection 2025-08-08 12:50:16 +10:00
fbe2710843 Add and enable default textures for other samplers 2025-07-31 00:08:43 +01:00
d591bcc09c Remove unnecessary cpp files 2025-07-15 15:19:23 +02:00
6bc7fcb7af Merge pull request #108567 from beicause/multimesh-null-checks
Add some multimesh null checks to avoid crash
2025-07-14 10:30:35 -05:00
35a2d7843e Merge pull request #104302 from brennennen/reflection_probe_count_error_check
Add error check for reflection probe invalid atlas index.
2025-07-14 10:30:31 -05:00
5352638f95 Add some multimesh null checks to avoid crash 2025-07-13 10:09:36 +08:00
2583aa4a68 Add error check for reflection probe invalid atlas index. 2025-07-10 19:03:21 -05:00
a1591512f8 Always perform color correction and debanding on nonlinear sRGB values.
Fixes #107730

Co-authored-by: LuoZhihao <luo_zhihao@outlook.com>
2025-07-08 13:44:53 -04:00
e750950dc6 Merge pull request #107568 from Rudolph-B/Issue-92708
Fix floating point precision errors when setting particle trail length
2025-07-01 17:57:58 -05:00
16b9ee6f50 Image: Implement 16-bit unorm and uint formats 2025-06-28 00:30:52 +02:00
de2aa1bc4d Fix: Ensure sky orientation is set when reflection uses sky 2025-06-22 23:50:39 +08:00
28fd557c58 Add missing vpv.push_back(pv); in render_target_get_sdf_texture. 2025-06-20 14:46:03 +02:00
c9511255de Merge pull request #107684 from dsnopek/revert-shadow-normal-bias-relative
Revert "Use lower shadow normal bias for distant directional shadow splits"
2025-06-19 09:53:54 -05:00
4cc1d0ba67 Revert "Use lower shadow normal bias for distant directional shadow splits"
This reverts commit dfc05caf06.
2025-06-18 18:14:22 -05:00
2b36c79f7b Use Span<uint8_t> in RenderingDevice allocation APIs to avoid intermediary arrays on calls. 2025-06-18 12:31:48 +02:00
3c5d4a2410 Fix floating point precision errors when setting particle trail length 2025-06-15 20:38:50 +02:00
7419e4429d Fix global shader texture uniform 2025-06-13 13:24:38 +08:00
fc523ec5f6 Merge pull request #107230 from dsnopek/rd-depth-image-swizzle
RendererRD: Fix swizzle on depth formats
2025-06-09 17:08:49 -05:00
316b9aa6d2 RendererRD: Fix swizzle on depth formats 2025-06-06 16:30:17 -05:00
fa30719814 Fix wrong default texture for global uniforms of type sampler2DArray 2025-06-05 11:12:03 -05:00
37982d4a01 Merge pull request #107116 from beicause/expose-mesh-surface-update-index-buffer
Expose `RS.mesh_surface_update_index_region`
2025-06-05 17:24:54 +02:00
63c124fa45 Expose RS.mesh_surface_update_index_region
And `mesh_surface_get_format_index_stride`
2025-06-05 19:35:59 +08:00
088ef7b6f6 Merge pull request #100283 from devloglogan/vk-motion-vectors
Implement motion vectors in mobile renderer
2025-06-05 13:10:20 +02:00
7a3d2f6779 Merge pull request #106606 from aaronfranke/pow2_64
Add 64-bit versions of core power of 2 functions
2025-06-02 18:51:56 -05:00