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

MRTK Standard Shader Reflections are the same for each eye (depth is wrong) on Android Oculus Quest #8207

Closed
Fragilem17 opened this issue Jul 24, 2020 · 6 comments
Labels
Bug Platform - Android Issues specific to the Android operating system Shaders / Materials Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on

Comments

@Fragilem17
Copy link

Fragilem17 commented Jul 24, 2020

a PBR material using the MRTK Standard Shader with reflections enabled feels right in the Unity Editor (2019.4.4f)
looking throught the Oculus Quest headset however shows that the reflections are being rendered from the same origin point for both eyes. This results in having no depth to the reflection and it looks really weird and wrong.

When previewing using Oculus Link (so running from the PC) the depth does look correct so it's something introduced when building the shaders for mobile (android).

To reproduce

Create a VR project for Oculus Quest using Unity 2019.4.4f, Single pass, forward rendering, NO URP
Create a highly reflective MRTK Standard Shader material with or without a channel map.
Create a scene where you have something to reflect of and attach the material.
Build for the Quest and run on device.
Move around the scene and look at the reflection. It feels like something is moving on top of the material instead of a clear reflection both eyes are seeing the same reflecting image and the illusion of reflection is gone. Close one eye and move sideways and you'll see the reflections feels okay again.

Expected behavior

a reflection that looks different for each eye

Screenshots

Very hard to take a screenshot explaining the problem as the quest only allows me to screenshot one eye.

Setup

  • Unity 2019.4.4f
  • Single pass, forward rendering, Standard Rendering Path, No URP.
  • MRTK Version 2.3.0
  • Oculus Utilities

Target platform

  • Oculus Quest VR SDK
  • Android
@Fragilem17 Fragilem17 added the Bug label Jul 24, 2020
@Fragilem17
Copy link
Author

Fixed it by adding this to the shader:
Starting on line 987:

#if defined(_NORMAL) || defined(_REFLECTIONS) || defined(_ENVIRONMENT_COLORING)
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
#endif

@wiwei
Copy link
Contributor

wiwei commented Jul 24, 2020

@Fragilem17 if you are comfortable sending out a PR for that, that would be awesome!

@keveleigh keveleigh added Platform - Android Issues specific to the Android operating system Shaders / Materials labels Jul 24, 2020
@stale
Copy link

stale bot commented Dec 24, 2020

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

@stale stale bot added the Stale label Dec 24, 2020
@Ayfel
Copy link

Ayfel commented Jan 19, 2021

Any news on this? Also not sure where to add the fix exactly that is mentioned above

P.S: Just add at the beginning of the fragment shader https://docs.unity3d.com/Manual/Android-SinglePassStereoRendering.html

@stale stale bot removed the Stale label Jan 19, 2021
@stale
Copy link

stale bot commented Apr 18, 2022

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

@IssueSyncBot
Copy link
Collaborator

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!

@IssueSyncBot IssueSyncBot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2024
@IssueSyncBot IssueSyncBot added the Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Platform - Android Issues specific to the Android operating system Shaders / Materials Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on
Projects
None yet
Development

No branches or pull requests

6 participants