-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix meshlet interactions with regular shading passes #13816
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,7 +162,7 @@ impl ViewNode for PrepassNode { | |
pass_span.end(&mut render_pass); | ||
drop(render_pass); | ||
|
||
// Copy prepass depth to the main depth texture if deferred isn't going to | ||
// After rendering to the view depth texture, copy it to the prepass depth texture if deferred isn't going to | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment makes sense for what the code does, but I'm not sure I understand when that would ever happen. If you use deferred + prepass, then you're using deferred so it will do the copy. If you just use the prepass without deferred, it should run before the main pass so I don't get why we would want to copy the view depth to the prepass depth. Shouldn't it be the other way around? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, is it because the meshlet prepass writes directly to the view depth? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think meshlets should be mentioned in that comment if that's the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is existing code, for the regular (non meshlet) prepass. We don't actually render directly to the prepass texture, we render to the view depth, and then copy the result into the prepass depth texture. I was just updating the comment as it was inaccurate before. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, right, I remember now. |
||
if deferred_prepass.is_none() { | ||
if let Some(prepass_depth_texture) = &view_prepass_textures.depth { | ||
command_encoder.copy_texture_to_texture( | ||
|
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.
Why the rename to add
_prepass
everywhere?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.
It was a bit confusing seeing "deferred" in the profiler. This made it a bit clearer, and matched the node name.