bevy/crates
JMS55 0518eda2ad
bevy_solari: RIS for Direct Lighting (#19620)
# Objective

- Start the realtime direct lighting work for bevy solari

## Solution

- Setup all the CPU-side code for the realtime lighting path (minus some
parts for the temporal reuse I haven't written yet)
- Implement RIS with 32 samples to choose a good random light
- Don't sample a disk for the directional light, just treat it as a
single point. This is faster and not much worse quality.

## Future
- Spatiotemporal reuse (ReSTIR DI)
- Denoiser (DLSS-RR)
- Light tile optimization for faster light selection 
- Indirect lighting (ReSTIR GI)

## Testing
- Run the solari example to see realtime
- Run the solari example with `-- --pathtracer` to see the existing
pathtracer

---

## Showcase

1 frame direct lighting:

![image](https://github.com/user-attachments/assets/b70b968d-9c73-4983-9b6b-b60cace9b47a)

Accumulated pathtracer output:

![image](https://github.com/user-attachments/assets/d681bded-ef53-4dbe-bcca-96997c58c3be)

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-06-23 00:47:10 +00:00
..
bevy_a11y Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_animation Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_anti_aliasing Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_app Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_asset Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_audio Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_color Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_core_pipeline Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_core_widgets Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_dev_tools Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_diagnostic Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_dylib Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_ecs Improve module structure of observers code (#19779) 2025-06-22 23:25:25 +00:00
bevy_encase_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_gilrs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_gizmos Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_gltf Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_image Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_input Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_input_focus Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_internal Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_log Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_macro_utils Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_math Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_mesh Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_mikktspace Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_pbr Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_picking Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_platform Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_ptr Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_reflect Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_remote Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_render bevy_solari: RIS for Direct Lighting (#19620) 2025-06-23 00:47:10 +00:00
bevy_scene Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_solari bevy_solari: RIS for Direct Lighting (#19620) 2025-06-23 00:47:10 +00:00
bevy_sprite Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_state Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_tasks Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_text Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_time Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_transform Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_ui Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_utils Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_window Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_winit Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00