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

Support depth only pass, more thorough attachment merge checking. #81

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DGriffin91
Copy link
Contributor

@DGriffin91 DGriffin91 commented Aug 25, 2024

Depth only passes are useful for depth prepasses and non-vsm shadow maps.

This PR addresses two issues that were blocking using depth only passes.

  • Resolver render_area() wasn't taking into account the depth attachment
  • When merging passes, if the lhs candidate had less or no color attachments, it would not be evaluated against rhs. Also it would not check if the other attachment was none and Attachment::are_compatible allows one or both of the attachments to be none. I tried addressing this in Attachment::are_compatible but it seems the usage elsewhere needs to be able to allow one of the attachments to be none.

I updated the multipass example with a depth only prepass for testing. This doesn't need to be included in the PR, or could be made optional. Since this example uses the stencil buffer for layering rather than the depth buffer, further adjustments would need to be made for an appropriate example.

@DGriffin91 DGriffin91 changed the title Support depth only pass, more through attachment merge checking. Support depth only pass, more thorough attachment merge checking. Aug 25, 2024
@DGriffin91
Copy link
Contributor Author

Thinking about this more, maybe it would be better to just first check if they have the same total attachment quantity? Assuming that's a requirement anyway.

@DGriffin91
Copy link
Contributor Author

Was just realizing that some of the checks at the end don't take into account that there may only be color attachments or only be depth attachments. Needs more work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant