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

Add support for passing a multisample state #91

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

wohe
Copy link
Contributor

@wohe wohe commented Sep 4, 2022

This adds a function to the builder to allow setting the multisample
state. If it is not called, the default is used as before.

This adds a function to the builder to allow setting the multisample
state. If it is not called, the default is used as before.
@wohe
Copy link
Contributor Author

wohe commented Sep 4, 2022

@hecrj @konall This is similar to #72, but attempts to add support without a breaking change. It makes it possible to draw text to a multisample texture.

Different from #72 is that it does not add multisample resolution which seems an orthogonal change to me:

  1. Already before it was possible to resolve the multisample texture first and then draw text without multisampling.
  2. This change makes it possible to draw text to the multisample texture, do further render passes, and resolve at the end. This includes adding a render pass that does nothing besides multisample resolution. This is similar to the clear render pass added in add support for MSAA #72 in the MSAA example: you cannot clear implicitly if you happen to render text first.
  3. What is not supported by this PR is resolving the multisample texture as part of the implicit render pass which happens when drawing text.

Copy link
Owner

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Nice! I believe these changes fit better with the current architecture of wgpu_glyph than #72.

@hecrj hecrj added the enhancement New feature or request label Nov 1, 2022
@hecrj hecrj added this to the 0.18.0 milestone Nov 1, 2022
@hecrj hecrj merged commit 85d3698 into hecrj:master Nov 1, 2022
@hecrj hecrj mentioned this pull request Nov 1, 2022
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 this pull request may close these issues.

2 participants