-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Lubos VR180 immersive mode #32
Conversation
…t if 5 is a special constant or based on resolution)
This request can cause issues if the user denies the microphone permission. Calling requestPermissions causes GrantPermissionsActivity to be launched. Citra's MainActivity will pause. GrantPermissionsActivity will immediately finish as the user has already denied the permission. Citra's MainActivity then gets resumed and then tries to request the permission again forming a loop.
Move request for microphone permission to onCreate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I added two minor comments.
@@ -300,4 +300,6 @@ | |||
<string name="vr_extra_performance_mode">VR Extra Performance Mode</string> | |||
<string name="vr_cpu_level">CPU level</string> | |||
<string name="vr_cpu_level_description">Higher levels may improve audio/emulation performance, but will drain the battery faster</string> | |||
<string name="vr_immersive_mode_title">(Experimental): VR180 Immersive Mode</string> | |||
<string name="vr_immersive_mode_description">Extends the top screen around a cylinder for VR180-style gameplay (Note: resolution is low and cannot be changed)</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to mention that extending the screen changes the depth value.
: panelHeight + verticalBorderTex + 2 * panelWidth / 5 - 4 * 5; | ||
layer.subImage.imageRect.extent.width = | ||
!useImmersiveMode_ ? panelWidth - cropHoriz : (panelWidth - 90 * resolutionFactor_) / 5; | ||
layer.subImage.imageRect.extent.height = !useImmersiveMode_ ? panelHeight : panelHeight / 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth of a comment like this:
//TODO:As a sideeffect useImmersiveMode_ changes the viewport for the bottom screen.
When applying useImmersiveMode_ on the bottom screen is gone this cropping could be removed.
Right now the bottom screen is more pixelated than it should.
Uses a smaller radius screen which fits just within the view bounds and therefore has a higher resolution, but still feels "immersive". I also lowered the lower screen so it doesn't obscure the smaller main panel.
e528693
to
b562399
Compare
…rsive mode so the wrong shader isn't used on settings switch
…ir default settings
I see you removed my variant :-( Pity. I just tested it and the immersion is much lower. You shouldn't call it VR180 anymore as the view range is below 180°. |
This means the same shaders can be used for both immersive and non-immersive as the uniform itself it the toggle in the GLSL rather than generating two different instances of the shader. Furthermore, only one place where the gl_Position was being modified was actually needed; the other two seem to be able to be removed without it preventing immersive mode from working.
Pass the vr_use_immersive_mode as a Vertex Shader Uniform flag
I mean, it was effectively the same one, just a different constant. Just added it back, though (passing the scale factor as a uniform) I was using "VR180" because I thought that's what you were calling it. I'll rename it to "Immersive Mode" because that avoids any specific connotations |
I know it is just a constant but it makes a difference between a "very big screen" and "VR-like experience".
Great. I do not see it in the code, I guess it is not pushed yet. Thank you :) |
This changeset adds Lubos' VR180-style immersive-mode -- behind an experimental feature -- to the core CitraVR project