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

WebGPURenderer: Support MSAA for texture render targets. #26451

Merged
merged 3 commits into from
Jul 20, 2023

Conversation

aardgoose
Copy link
Contributor

Support antialiasing for texture render targets using the standard texture creation path to handle extra sampling texture creation required.

@sunag sunag added this to the r155 milestone Jul 17, 2023

}

const options = { sampleCount };
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we could use { samples } name to preserve the property name used in RenderTarget.

@sunag sunag merged commit afe58df into mrdoob:dev Jul 20, 2023
@aardgoose aardgoose deleted the msaa branch July 28, 2023 15:07
@@ -156,6 +157,17 @@ class WebGPUTextureUtils {

}

if ( texture.isRenderTargetTexture && sampleCount > 1 ) {

const msaaTextureDescriptorGPU = Object.assign( {}, textureDescriptorGPU );
Copy link
Contributor

Choose a reason for hiding this comment

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

I think { ...textureDescriptorGPU } looks a bit clearer that it is just a clone.

@@ -156,6 +157,17 @@ class WebGPUTextureUtils {

}

if ( texture.isRenderTargetTexture && sampleCount > 1 ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we can do just primarySampleCount > 1.

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.

3 participants