Support depth only pass, more thorough attachment merge checking. #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
render_area()
wasn't taking into account the depth attachmentAttachment::are_compatible
allows one or both of the attachments to be none. I tried addressing this inAttachment::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.