Skip to content

EXRLoader: Copy Y to RGB channels and return RGBAFormat #31493

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

Closed
wants to merge 1 commit into from
Closed

Conversation

mrdoob
Copy link
Owner

@mrdoob mrdoob commented Jul 24, 2025

Related issue: #31429 #31482

Description

@sciecode Also made with Claude! 🤓 Looks good?

/cc @Mugen87 @drone1

@mrdoob mrdoob added this to the r179 milestone Jul 24, 2025
@sciecode
Copy link
Contributor

sciecode commented Jul 24, 2025

Close, but no cigar.

It's not handling HalfFloatType alpha, that needs to be 0x3C00.

And trying to expand during decoding isn't great, in case we need to change / implement extra features in the future. Better to do it once decoding is done.

@sciecode
Copy link
Contributor

sciecode commented Jul 24, 2025

Mugen87 also suggested that we made the extension optional (but defaults to true), which I think it's probably a good idea.

@drone1
Copy link

drone1 commented Jul 28, 2025

@mrdoob I realize you're still working, but if you think it'd be helpful for me to pitch in with a test in examples to keep an eye on this issue going forward, lemme know and I can do that.

It looks like your changes have at least fixed the issue for the specific .exr roughness map I referenced.

image

I could potentially do some more testing with other textures and submit a PR. If it makes more sense for you or someone else to do it, no worries ofc.

EDIT: I kinda just did it to make the screenshot in the end haha. Let me know if I can help :]

Looks like the asset is OK to include with three.js (pasted the license into Claude), and I credited the artist.

@mrdoob mrdoob deleted the exr branch July 29, 2025 08:56
@mrdoob
Copy link
Owner Author

mrdoob commented Jul 29, 2025

I don't think we need to update the example.

However, just added support for exr to the editor (01d3c94) to make testing easier:

Screenshot 2025-07-29 at 6 03 36 PM

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.

3 participants