Skip to content
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

check for any prepass phase #10160

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Oct 17, 2023

Objective

deferred doesn't currently run unless one of DepthPrepass, ForwardPrepass or MotionVectorPrepass is also present on the camera.

Solution

modify the queue_prepass_material_meshes view query to check for any relevant phase, instead of requiring Opaque3dPrepass and AlphaMask3dPrepass to be present

@robtfm robtfm added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Oct 17, 2023
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sucks that this isn't user extensible. Definitely feels like a good first-party use of trait queries.

@robtfm
Copy link
Contributor Author

robtfm commented Oct 17, 2023

Another viable option would be to make the function generic over the RenderPhase and add it twice, but I wanted to do a quick/easy fix first

Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit uneasy about the unwraps. I know they can't currently happen but it still feels a bit wrong if the code ever changes. Not sure what would be better though.

@robtfm
Copy link
Contributor Author

robtfm commented Oct 17, 2023

I'm a bit uneasy about the unwraps. I know they can't currently happen but it still feels a bit wrong if the code ever changes. Not sure what would be better though.

I am only adding two to the existing two … also I think a crash here is probably fine since it implies an engine code error, never a user error?

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Oct 17, 2023
@alice-i-cecile alice-i-cecile added this to the 0.12 milestone Oct 17, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 17, 2023
Merged via the queue into bevyengine:main with commit de8a600 Oct 17, 2023
25 checks passed
ameknite pushed a commit to ameknite/bevy that referenced this pull request Nov 6, 2023
# Objective

deferred doesn't currently run unless one of `DepthPrepass`,
`ForwardPrepass` or `MotionVectorPrepass` is also present on the camera.

## Solution

modify the `queue_prepass_material_meshes` view query to check for any
relevant phase, instead of requiring `Opaque3dPrepass` and
`AlphaMask3dPrepass` to be present
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

deferred doesn't currently run unless one of `DepthPrepass`,
`ForwardPrepass` or `MotionVectorPrepass` is also present on the camera.

## Solution

modify the `queue_prepass_material_meshes` view query to check for any
relevant phase, instead of requiring `Opaque3dPrepass` and
`AlphaMask3dPrepass` to be present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants