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

BasisTextureLoader: Update Basis library. #21094

Merged
merged 5 commits into from
Jan 16, 2021

Conversation

donmccurdy
Copy link
Collaborator

Updates to the newest version of the Basis library, which includes APIs we'll need to use for THREE.KTX2Loader later.

Also fixes #19797 by flipping the UVs on the example, although this is unrelated to the library update.

@donmccurdy donmccurdy changed the title Basis: Update Basis library. BasisTextureLoader: Update Basis library. Jan 16, 2021
@WestLangley
Copy link
Collaborator

I think it would be best to use a texture that has an obvious right-side-up.

... And texture a simple plane geometry, as in https://threejs.org/examples/webgl_loader_texture_exr.html.

@donmccurdy
Copy link
Collaborator Author

Sounds good, updated:

Screen Shot 2021-01-15 at 9 00 46 PM

@WestLangley
Copy link
Collaborator

There is no need for a spinning plane; it obfuscates bugs.

That is why the flipY problem was not noticed in the first place.

Also, what is the aspect ratio of the new basis texture? You are texturing a square plane.

@donmccurdy
Copy link
Collaborator Author

What you would prefer that this example contain?

@WestLangley
Copy link
Collaborator

What you would prefer that this example contain?

IMHO, a static image with the correct aspect ratio.

@donmccurdy
Copy link
Collaborator Author

I've fixed the aspect ratio — it was off by 2% so I'm surprised you were seeing a difference? I think it is necessary to at least include OrbitControls here. If the image is static, I can't tell whether mipmaps are loaded correctly.

@mrdoob
Copy link
Owner

mrdoob commented Jan 16, 2021

Indeed. Another benefit of having a rotating object is that we can see if we are missing frames at texture upload.

@mrdoob mrdoob added this to the r125 milestone Jan 16, 2021
@mrdoob mrdoob merged commit 034f5fd into mrdoob:dev Jan 16, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jan 16, 2021

Thanks!

@donmccurdy donmccurdy deleted the deps-update-basis branch January 16, 2021 20:34
@WestLangley
Copy link
Collaborator

I've fixed the aspect ratio — it was off by 2% so I'm surprised you were seeing a difference?

Oh, I thought the aspect of the basis file was the same as the aspect of 758px-Canestra_di_frutta_(Caravaggio).jpg.

//

But still, calling the constructor without args raises unnecessary questions for me.

const geometry = flipY( new THREE.PlaneBufferGeometry() );

I was expecting you were going to query the texture's aspect (somehow), and set the plane aspect to match.

@donmccurdy
Copy link
Collaborator Author

I cropped it to 512x512 for this example to include compressed mipmaps. 👍

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.

BasisTextureLoader example: the texture is rendered upside down
3 participants