-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Initial DLSS implementation #19864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Initial DLSS implementation #19864
Conversation
It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note. Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes. |
@cart not sure what licensing concerns there are with this. See the license notes in https://github.com/JMS55/dlss_wgpu/blob/main/README.md. |
You added a new example but didn't add metadata for it. Please update the root Cargo.toml file. |
Lies D: |
You added a new example but didn't add metadata for it. Please update the root Cargo.toml file. |
Rad! My only concern here is that we're taking a dependency on an external crate that depends on a specific version of wgpu. This will make upstream bevy wgpu updates harder, as it will require collaboration with owner of the crate (in this case, you, which is much better than a stranger, but still a risk).
I think this is ok, given that the onus is on developers to wire up the SDK themselves. |
Theoretically it's an optional feature, so it shouldn't block wgpu upgrades. Of course I'm happy to update it asap. I'm also happy to put it in the bevy repo, up to maintainers. I don't have a preference either way. |
You added a new example but didn't add metadata for it. Please update the root Cargo.toml file. |
//! NVIDIA Deep Learning Super Sampling. | ||
//! | ||
//! See https://github.com/bevyengine/dlss_wgpu for licensing requirements and setup instructions. | ||
//! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like information on "what happens if your user doesn't have a compatible graphics card here-ish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhh probably an error. Don't insert the component if you haven't checked DlssSupported :P
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
|
||
#[cfg(feature = "dlss")] | ||
#[derive(Resource)] | ||
pub struct DlssProjectId(pub bevy_asset::uuid::Uuid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be unique for each application instance? Stable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unique per app. The DLSS programming guide provides more details
return; | ||
} | ||
|
||
let dlss_project_id = app.world().resource::<DlssProjectId>().0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to have a better error message here if the user forgets to add this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There already is, it's in bevy render :)
render_device: Res<RenderDevice>, | ||
render_queue: Res<RenderQueue>, | ||
frame_count: Res<FrameCount>, | ||
mut commands: Commands, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: commands first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an obvious suggestion for another solution but I really don't like polluting this file with a bunch of dlss feature flags and specific code. It feels like we need a more generalized pattern for modifying the render initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DLSS is special because we need native extensions that you can't enable via wgpu features. This won't be a problem for anything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, it's been a problem on some of my own projects, and while that's not going to be upstreamed, I still think having more robust pattern here would be beneficial as the DLSS feature spam adds a lot of noise for a specific rendering feature.
Objective
Solution
Testing
Showcase