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

Viewer: add support for hdr environments #16218

Merged
merged 4 commits into from
Feb 25, 2025

Conversation

ryantrem
Copy link
Member

When loading an environment from a .hdr file, we need to use HDRCubeMap rather than CubeMap. To enable this:

  1. Add a helper function for getting the file extension from a url.
  2. Viewer tries to determine the extension from the environment url.
  3. If the extension is .hdr, we use HDRCubeMap instead of CubeMap.
  4. In either case, the necessary cube map texture module is dynamically imported.

@ryantrem ryantrem requested a review from sebavan February 25, 2025 21:08
@bjsplat
Copy link
Collaborator

bjsplat commented Feb 25, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 25, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 25, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 25, 2025

@ryantrem ryantrem requested a review from sebavan February 25, 2025 21:40
@bjsplat
Copy link
Collaborator

bjsplat commented Feb 25, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 25, 2025

@ryantrem ryantrem enabled auto-merge (squash) February 25, 2025 22:14
@ryantrem ryantrem merged commit 3f58c31 into BabylonJS:master Feb 25, 2025
15 checks passed
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