attackgoat / screen-13

Screen 13 is an easy-to-use Vulkan rendering engine in the spirit of QBasic.
Apache License 2.0
252 stars 12 forks source link

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

Open DGriffin91 opened 2 months ago

DGriffin91 commented 2 months ago

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.

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 commented 2 months ago

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 commented 2 months ago

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.