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: Fix linear filter textures w/o mipmaps #29172

Merged

Conversation

RenaudRohlinger
Copy link
Collaborator

@RenaudRohlinger RenaudRohlinger commented Aug 19, 2024

Related issue: #27071

Description

This PR addresses an issue in the WebGL backend where textures using linear filtering without mipmaps are rendered as completely black. The problem was caused by incorrect filtering, specifically the use of LinearMipmapLinearFilter instead of the appropriate filter for non-mipmapped textures.

For more context, an initial fix was made to address video textures breaking in the examples. However, this fix was only partial, as it did not cover all cases and still affects any linear filtered texture without mipmaps. More details in the related PR:
#27610

This contribution is funded by Utsubo

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.4 kB (169.7 kB) 685.4 kB (169.7 kB) +0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
462 kB (111.4 kB) 462 kB (111.4 kB) +0 B

@RenaudRohlinger RenaudRohlinger added this to the r168 milestone Aug 19, 2024
@RenaudRohlinger RenaudRohlinger merged commit 00e8861 into mrdoob:dev Aug 19, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant