-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Conversation
|
||
} | ||
|
||
const options = { sampleCount }; |
There was a problem hiding this comment.
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
.
@@ -156,6 +157,17 @@ class WebGPUTextureUtils { | |||
|
|||
} | |||
|
|||
if ( texture.isRenderTargetTexture && sampleCount > 1 ) { | |||
|
|||
const msaaTextureDescriptorGPU = Object.assign( {}, textureDescriptorGPU ); |
There was a problem hiding this comment.
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 ) { |
There was a problem hiding this comment.
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
.
Support antialiasing for texture render targets using the standard texture creation path to handle extra sampling texture creation required.