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

Add support for UI texture scaling #790

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Add support for UI texture scaling #790

merged 1 commit into from
Apr 9, 2019

Conversation

MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Nov 20, 2018

We are using pretty big textures now for UI due to the Android screen density. VR doesn't have the same density so we may be using more than needed. This PR allows to set a specific texture scaling per widget. The "big" scaling is done on the UI renderer only after each render due to layout changes instead of every frame on the GPU

I set a default value of 0.75f. There may be some better formula taking z into account but it's a starting point. I saw some improvements on the aliasing of the navigation bar on Oculus with Layers enabled (In addition to reduced texture sizes). It should have a similar aliasing effects to creating mipmaps if we are able to set the right value here.

I'd like some more testing on all the platforms. Thoughts?

Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@keianhzo
Copy link
Collaborator

@MortimerGoro I'm seeing an artifact if you turn off/on the headset, it seems like the texture scaling is not correct after scaling.

See the gaps between the tray buttons below.

scaling2

@cvan cvan added this to the v1.1 milestone Nov 25, 2018
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.

thanks for working on this. 👍

I also notice the vertical gaps between the Tray icons. besides that, I could not discern any visual improvements or regressions.

where should I be looking in particular to discern the improvements?

@MortimerGoro
Copy link
Contributor Author

Yes, I reproduced the gap in the tray.

I'll investigate this later. There is no rush to land this for v1.1

@cvan cvan added this to Low priority in FxR Future Dec 6, 2018
@cvan cvan modified the milestones: v1.1, v1.2 Dec 11, 2018
@bluemarvin
Copy link
Contributor

@MortimerGoro This might be a good one for 1.1.1 release?

@cvan
Copy link
Contributor

cvan commented Dec 19, 2018

@MortimerGoro when you get a min, can we resolve the conflicts? this looks ready to go

@MortimerGoro
Copy link
Contributor Author

I still need to research some of vertical gap issues. Probably not in time for v1.1.1

@MortimerGoro
Copy link
Contributor Author

I fixed the gaps on the tray and rebased all the code. This is ready for review again

@bluemarvin
Copy link
Contributor

On fresh start, the URL bar is clipped on Vive Focus.
screen_shot_1902142708

@MortimerGoro
Copy link
Contributor Author

MortimerGoro commented Apr 9, 2019

@bluemarvin I've seen that issue too without this PR but it's quite difficult to reproduce.

I rebased the PR. I think it's ready to merge

@bluemarvin
Copy link
Contributor

I'm not longer able to reproduce the issue. It was 100% reproducible before on Focus. I think there have been several system updates so maybe that fixed something.

@bluemarvin bluemarvin merged commit 3e47cb1 into master Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
FxR Future
  
Low priority
Development

Successfully merging this pull request may close these issues.

None yet

5 participants