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

VR Text update lag #281

Open
SinanAkkoyun opened this issue Dec 16, 2024 · 1 comment
Open

VR Text update lag #281

SinanAkkoyun opened this issue Dec 16, 2024 · 1 comment

Comments

@SinanAkkoyun
Copy link

SinanAkkoyun commented Dec 16, 2024

Hello!
I have a UI that has 5 elements to reach my text (total # elements: 30 but pretty flat).
No matter if it's the first or last part in the hierarchy, whenever I change my MSDF text (in a 1s interval), I get a very noticable lag spike in VR (in 120Hz mode, Quest2).

I need to change a lot of text every 100ms. All text will be the last element in the hierarchy, so technically nothing except the text needs updating, but it seems as if ThreeMeshUI updates everything.
As a workaround I already tried to call text.update() and textContainer.update() in advance but no luck

image

Comparison to Desktop (very few operations)
image

I would appreciate any help, it would be cool if this could be fixed or if someone at least could tell me how to only update my text without updating anything else!

@SinanAkkoyun
Copy link
Author

SinanAkkoyun commented Dec 16, 2024

image

getProgramInfoLog and getShaderInfoLog eat up half of that lag time.

It looks to me as if each time the text gets updated, it creates a new shader program which is also contributing to the lag, but that's just speculation

I still can't explain the extensive update in VR compared to desktop...

@SinanAkkoyun SinanAkkoyun changed the title Traverse Update Lag in VR Desktop vs VR text update immense lag Dec 16, 2024
@SinanAkkoyun SinanAkkoyun changed the title Desktop vs VR text update immense lag VR Text update lag Dec 17, 2024
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

No branches or pull requests

1 participant