Skip to content

Conversation

@emmanueljl
Copy link
Contributor

Description

Currently, the KTX2Loader is hardcoded to only process the first level. This backwards-compatible PR processes any additional levels and attaches them to the mipmaps field of the returned DataTexture.

Make parallel calls to createDataTexture for each level, then return them through the mipmaps array
@Mugen87 Mugen87 changed the title In KTX2Loader, return LODs through DataTexture's mipmaps field KTX2Loader: Return LODs through DataTexture's mipmaps field. Apr 17, 2023
@emmanueljl
Copy link
Contributor Author

@donmccurdy The latest commit structures mipmaps as {data,width,height} POJOs and it renders properly. This sample uses NearestMipmapNearestFilter for minFilter to show the different levels (colors) being rendered, especially visible in the side view.

@donmccurdy donmccurdy added this to the r153 milestone Apr 24, 2023
Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

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

This is looking good, thanks! I think we can likely merge after the r152 release this week.

@emmanueljl emmanueljl requested a review from donmccurdy April 24, 2023 18:20
@donmccurdy donmccurdy merged commit 2ca91c7 into mrdoob:dev May 2, 2023
@donmccurdy
Copy link
Collaborator

Thank you @emmanueljl!

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.

4 participants