Add simple Solari example: 3d_scene but with raytracing#23805
Add simple Solari example: 3d_scene but with raytracing#23805qthree wants to merge 1 commit intobevyengine:mainfrom
Conversation
|
Welcome, new contributor! Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨ |
|
I would prefer if it was called |
3582d71 to
b1ab859
Compare
JMS55
left a comment
There was a problem hiding this comment.
Overall example looks good, but I think it could do with a modest boost in lighting to be less "gloomy".
Thanks for doing this!
|
|
||
| /// Real-time raytracing produces noisy output because it cannot trace enough rays per pixel in a single frame. | ||
| /// Instead, it distributes work stochastically across frames. | ||
| /// Therefore, a denoiser is required to achieve high-quality image. |
There was a problem hiding this comment.
| /// Therefore, a denoiser is required to achieve high-quality image. | |
| /// Therefore, a denoiser is required to achieve a high-quality image. |
| /// Real-time raytracing produces noisy output because it cannot trace enough rays per pixel in a single frame. | ||
| /// Instead, it distributes work stochastically across frames. | ||
| /// Therefore, a denoiser is required to achieve high-quality image. | ||
| /// DLSS Ray Reconstruction provides hardware-accelerated denoising. |
There was a problem hiding this comment.
DLSS-RR also makes it overall cheaper via upscaling from a lower resolution (less rays to trace).
| Transform::from_xyz(-2.5, 4.5, -3.0).looking_at(Vec3::ZERO, Vec3::Y), | ||
| )); | ||
| // camera | ||
| let mut _camera = commands.spawn(( |
There was a problem hiding this comment.
| let mut _camera = commands.spawn(( | |
| commands.spawn(( |
There was a problem hiding this comment.
It's used later to insert Dlss::<DlssRayReconstructionFeature>
| MeshMaterial3d(materials.add(StandardMaterial { | ||
| base_color: css::DARK_GRAY.into(), | ||
| perceptual_roughness: 0.0, | ||
| metallic: 0.15, |
There was a problem hiding this comment.
Metallic should never really be anything besides 1.0 or 0.0 (intermediate values are pretty much just for blending between different materials)
There was a problem hiding this comment.
It's a result of experimentation to make clear reflections of cubes, but not too mirror-y.
Other values gave me graphical artifacts (light noise/flashes with DLSS enabled).
There was a problem hiding this comment.
You should change perceptual_roughness if you don't want a perfect mirror, not metallic. Try a low roughness like 0.05 or 0.1.
Objective
There is no example which explains the most minimal Solari setup.
Solution
PR adds new example which showcases bare-bones 3d scene with raytracing.
Testing
Example works when called as
Showcase
With DLSS (add

dlssto--features=):Without DLSS:
