-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Texture: Always generate mipmaps when "generateMipmaps" is true. #29677
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
To better reflect the change, we should update example code that uses nearest or linear filtering without requiring mipmaps. E.g.: Looking at this specific example, the textures
three.js/src/renderers/common/Textures.js Line 340 in 1360b24
|
Fixed #18861
Description
Change the behavior of Texture mipmap generation to always respect the
generateMipmaps
flag. Previously mipmaps would only be generated when "minFilter" and "magFilter" required mip maps, as well, but with default support for textureLod in WebGL2 and textureSampleLevel in WebGPU, filtering is no longer the only way to use mipmaps.This change will mean that mipmaps will be generated for all non-data textures by default; even when users set filtering to use
NEAREST
. This will potentially result in higher memory usage and a (small?) performance cost even if they're not used.