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

Fix environment switch glitches #1030

Merged
merged 1 commit into from
Mar 18, 2019
Merged

Fix environment switch glitches #1030

merged 1 commit into from
Mar 18, 2019

Conversation

MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Mar 18, 2019

Fixes #1021

The problem is that TextureCubemap internal initilization is triggered from two threads at the same time, the loader thread, and the main render thread when it binds the cubemap texture for the current frame. This happens because we are using a geometry already added to the scenegraph after a environment change.

@ghost ghost assigned MortimerGoro Mar 18, 2019
@ghost ghost added the in progress label Mar 18, 2019
@MortimerGoro MortimerGoro force-pushed the environment_reload branch 2 times, most recently from 108f125 to b953929 Compare March 18, 2019 19:45
Copy link
Contributor

@philip-lamb philip-lamb left a comment

Choose a reason for hiding this comment

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

Tested OK on Vive Focus, Oculus Go.

@MortimerGoro MortimerGoro merged commit 1ff1105 into master Mar 18, 2019
@ghost ghost removed the in progress label Mar 18, 2019
@cvan cvan deleted the environment_reload branch March 18, 2019 22:52
@cvan cvan added this to the v1.1.4 milestone Mar 18, 2019
Copy link
Contributor

@cvan cvan left a comment

Choose a reason for hiding this comment

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

👍 looks fixed, thanks! I tested switching environments and installing a custom environment on both the Pico G2 and Oculus Go. environments appear to load significantly faster now (than before this branch) on the Pico G2 - nice work.

@bluemarvin
Copy link
Contributor

environments appear to load significantly faster on the Pico G2 - nice work.

The Pico G2 CPU is significantly faster than the Go.

@cvan
Copy link
Contributor

cvan commented Mar 18, 2019

environments appear to load significantly faster on the Pico G2 - nice work.

The Pico G2 CPU is significantly faster than the Go.

my phrasing was ambiguous: before this PR, the environments changed faster on the Oculus Go than on the Pico G2. in this branch, the environments load at perceptibly the same speed. good improvements across the board 👍

@MortimerGoro
Copy link
Contributor Author

before this PR, the environments changed faster on the Oculus Go than on the Pico G2. in this branch, the environments load at perceptibly the same speed. good improvements across the board

It makes sense, the environment was loaded twice due to the initialization race condition

@cvan cvan modified the milestones: v1.1.4, v1.1.3 Apr 15, 2019
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.

Environment maps not loading correctly after switching environments
4 participants