mirror of
https://github.com/amwatson/CitraVR.git
synced 2024-09-20 03:11:40 +02:00
Fixes and Improvements
Fix for OOT and MM rendering issue Improved screen location in super immersive made it closer and clearer
This commit is contained in:
parent
b70f28837f
commit
1ec5508bf4
5 changed files with 17 additions and 10 deletions
|
@ -442,13 +442,20 @@ XrPosef GameSurfaceLayer::GetTopPanelFromHeadPose(uint32_t eye, const XrPosef& h
|
|||
XrVector3f forward, up, right;
|
||||
XrMath::Quatf::ToVectors(headPose.orientation, forward, right, up);
|
||||
|
||||
panelPosition.z += kSuperImmersiveRadius * (forward.x * 0.43f);
|
||||
panelPosition.y -= kSuperImmersiveRadius * (forward.z * 0.43f);
|
||||
panelPosition.x += kSuperImmersiveRadius * (forward.y * 0.43f);
|
||||
panelPosition.z += kSuperImmersiveRadius * (forward.x * 0.58f);
|
||||
panelPosition.y -= kSuperImmersiveRadius * (forward.z * 0.58f);
|
||||
panelPosition.x += kSuperImmersiveRadius * (forward.y * 0.58f);
|
||||
|
||||
panelPosition.z += up.x / 16.f;
|
||||
panelPosition.y -= up.z / 16.f;
|
||||
panelPosition.x += up.y / 16.f;
|
||||
panelPosition.z += up.x / 25.f;
|
||||
panelPosition.y -= up.z / 25.f;
|
||||
panelPosition.x += up.y / 25.f;
|
||||
|
||||
if (mImmersiveMode == 3)
|
||||
{
|
||||
panelPosition.z += right.x * (0.065f / 2.f) * (1 - 2.f * eye);
|
||||
panelPosition.y -= right.z * (0.065f / 2.f) * (1 - 2.f * eye);
|
||||
panelPosition.x += right.y * (0.065f / 2.f) * (1 - 2.f * eye);
|
||||
}
|
||||
|
||||
return XrPosef{headPose.orientation, panelPosition};
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ std::chrono::time_point<std::chrono::steady_clock> gOnCreateStartTime;
|
|||
std::unique_ptr<OpenXr> gOpenXr;
|
||||
MessageQueue gMessageQueue;
|
||||
|
||||
const std::vector<float> immersiveScaleFactor = {1.0f, 3.0f, 1.8f};
|
||||
const std::vector<float> immersiveScaleFactor = {1.0f, 3.0f, 1.4f};
|
||||
|
||||
void ForwardButtonStateChangeToCitra(JNIEnv* jni, jobject activityObject,
|
||||
jmethodID forwardVRInputMethodID, const int androidButtonCode,
|
||||
|
|
|
@ -87,7 +87,7 @@ Handler::Handler(Core::Timing& timing, u64 override_init_time) : timing(timing)
|
|||
|
||||
float slidestate = Settings::values.vr_immersive_mode.GetValue() < 3 ?
|
||||
Settings::values.factor_3d.GetValue() / 100.0f :
|
||||
0.1f;
|
||||
0.01f;
|
||||
shared_page.sliderstate_3d = static_cast<float_le>(slidestate);
|
||||
|
||||
// TODO(PabloMK7)
|
||||
|
|
|
@ -219,7 +219,7 @@ void Module::UpdatePadCallback(std::uintptr_t user_data, s64 cycles_late) {
|
|||
// and possibly moved to its own Core::Timing event.
|
||||
mem->pad.sliderstate_3d = Settings::values.vr_immersive_mode.GetValue() < 3 ?
|
||||
(Settings::values.factor_3d.GetValue() / 100.0f) :
|
||||
0.1f;
|
||||
0.01f;
|
||||
system.Kernel().GetSharedPageHandler().Set3DSlider(mem->pad.sliderstate_3d);
|
||||
|
||||
// Reschedule recurrent event
|
||||
|
|
|
@ -941,7 +941,7 @@ void RasterizerAccelerated::ApplyVRDataToPicaVSUniforms(Pica::Shader::Generator:
|
|||
* still possible to supply your own values using the config options, but the default now should be using this
|
||||
* "auto-detect" routine.
|
||||
*/
|
||||
if (viewMatrixIndex == -1)
|
||||
if (viewMatrixIndex == -1 && mode >= 3)
|
||||
{
|
||||
struct regscore
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue