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 for depth testing? #11

Closed
paulkernfeld opened this issue Aug 3, 2019 · 3 comments · Fixed by #13
Closed

Support for depth testing? #11

paulkernfeld opened this issue Aug 3, 2019 · 3 comments · Fixed by #13
Labels
enhancement New feature or request
Milestone

Comments

@paulkernfeld
Copy link
Contributor

In certain cases, it might be nice to be able to render text that is behind objects that have already been rendered, i.e. by using depth testing.

I'm not 100% clear on how wgpu_glyph's rendering pipeline should interact with the user's rendering pipeline, but I think it might be possible to have the user pass in a DepthStencilStateDescriptor and a RenderPassDepthStencilAttachmentDescriptor.

@hecrj hecrj added the enhancement New feature or request label Aug 3, 2019
@hecrj
Copy link
Owner

hecrj commented Aug 3, 2019

Absolutely. This feature is missing.

The challenge here is to offer a safe API. The issue is that if we create a pipeline with a DepthStencilStateDescriptor, then it should be mandatory for the user to provide a depth attachment to draw_queued.

I think we can easily achieve this with a phantom type D in GlyphBrush. Let me give it a shot.

@hecrj
Copy link
Owner

hecrj commented Aug 4, 2019

I have been able to get a draft implementation with a depth example in #13! I still have to think about some changes a bit, but let me know what you think!

@hecrj hecrj closed this as completed in #13 Aug 7, 2019
@paulkernfeld
Copy link
Contributor Author

Overall this does exactly what I was hoping for; thanks so much!

@hecrj hecrj added this to the 0.4.0 milestone Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants