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

TextureUtils: Add WebGPU version. #29348

Merged
merged 3 commits into from
Sep 9, 2024
Merged

TextureUtils: Add WebGPU version. #29348

merged 3 commits into from
Sep 9, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Sep 7, 2024

Related issue: #29295

Description

This PR adds a WebGPU version of. TextureUtils.

@@ -83,6 +83,7 @@ export function decompress( texture, maxTextureSize = Infinity, renderer = null
readableTexture.magFilter = texture.magFilter;
readableTexture.wrapS = texture.wrapS;
readableTexture.wrapT = texture.wrapT;
readableTexture.colorSpace = texture.colorSpace;
Copy link
Collaborator Author

@Mugen87 Mugen87 Sep 7, 2024

Choose a reason for hiding this comment

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

I think it's better for consistency if the color space property of the original texture is retained.

let _renderer;
const _quadMesh = /*@__PURE__*/ new QuadMesh();

export async function decompress( blitTexture, maxTextureSize = Infinity, renderer = null ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The new decompress() function is now async since an internal WebGPURenderer has to call init() before performing the decompression.

@Mugen87 Mugen87 marked this pull request as draft September 8, 2024 08:02
@Mugen87 Mugen87 marked this pull request as ready for review September 9, 2024 09:00
@Mugen87 Mugen87 added this to the r169 milestone Sep 9, 2024
@Mugen87 Mugen87 merged commit 94f287d into mrdoob:dev Sep 9, 2024
11 checks passed
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.

1 participant