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

Avoid attempting to load cubemap when envMap is not set for probe light (fix #5610) #5611

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Nov 18, 2024

Description:
In case no envMap was set for a probe light an attempt was still made to load it as a cube map. This resulted in a failed request and an error message in the console (see #5610)

This PR updates the updateProbeLight function to avoid this as well as clean up the caching logic. The cache would contain promises while the cube map was loading, but these never called the resolve method. This meant that if two probe lights would load the same envMap one of them would endlessly wait on a never-resolving Promise.

Fixes #5610

Changes proposed:

  • Don't continue loading cube map when envMap is not set
  • Make the cube map loading promise resolve the resulting LightProbe instance

@dmarcos dmarcos changed the title Avoid attempting to load cubemap when envMap is not set for probe light Avoid attempting to load cubemap when envMap is not set for probe light (fix #5610) Nov 18, 2024
@dmarcos dmarcos merged commit 1d8cdb0 into aframevr:master Nov 18, 2024
3 checks passed
@dmarcos
Copy link
Member

dmarcos commented Nov 18, 2024

Thank you very much!

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.

error switching to AR mode on Galaxy Tab A9+
2 participants