-
-
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
(WIP) KTX2Loader: Return DataTexture when transcoding to uncompressed format #29926
base: dev
Are you sure you want to change the base?
(WIP) KTX2Loader: Return DataTexture when transcoding to uncompressed format #29926
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@Mugen87 I'm running into the old problems from #26642 (comment) here, I'm just not sure how to properly set up mipmaps for DataTexture, DataArrayTexture, and DataCubeTexture classes. I've left Data3DTexture out of scope for this PR. I see what looks like a TODO about it here: three.js/src/renderers/webgl/WebGLTextures.js Lines 1301 to 1307 in de9b967
I also feel worried about this pattern... texture = new DataCubeTexture( mipmaps[ 0 ].data, format, type );
texture.mipmaps = mipmaps.map( ( mip ) => new DataCubeTexture( mip.data, mip.width, mip.height ) ); ... since the other existing pattern is to initialize a CubeTexture with an array of 6 DataTextures, but here we have one DataCubeTexture per mip, not per face, and it's pretty inconsistent. Is this something we could work out for the |
Yes, it think this TODO should eventually be resolved. Ideally, the image and mipmaps property behaves the same for all texture types. The policy should be: If no mipmaps are present, the engine evaluates the |
Work in progress. Tested and working for:
Related: