microsoft / microsoft/MixedReality-GraphicsTools-Unity

UV flips up and down on HoloLens2 real device in magnifier function.

Abierto
#147 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug good first issue
Lenguaje dominante
C#
Estrellas
209
Forks
49
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Describe the bug

While playing with the new feature while working on other MRGT issues, I encountered a problem with the screen of the magnifier function flipping upside down on the actual HoloLens2 device.

https://youtu.be/C5aYusFA_tM

I was able to get it working on the actual device by inverting the Y component of the UV in Graphics Tools/Magnifier.

            half4 frag(v2f i) : SV_Target
            {               
                float2 normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(i.vertex);

                float2 normalizedScreenSpaceUVStereo = UnityStereoTransformScreenSpaceTex(normalizedScreenSpaceUV);              

                normalizedScreenSpaceUVStereo.y *=-1; //Add!!
                float2 zoomedUv = zoomIn(normalizedScreenSpaceUVStereo, MagnifierMagnification, Center);
               
                float4 output = SAMPLE_TEXTURE2D_X(MagnifierTexture, samplerMagnifierTexture, zoomedUv);
                                
                return output;
            }

https://youtu.be/-tDxe4X7AnQ

 I have previously encountered the same UV upside down phenomenon when using CameraOpaqueTexture in a URP environment to create my own lightweight Bloom post effect.
 This only occurred on the actual HoloLens device, not on the Editor, and seems to be the same as this time.

 Maybe there is something going on with the HoloLens rendering or deploying from Untiy, but I don't understand it and am very curious.

To reproduce

I deployed to HoloLens2 in Unity2021.3.5f1 with MRTKv2.8.2 using OpenXR platform.

Expected behavior

It needs to be rendered correctly in HoloLens as well as VR without tampering with the code itself.

Screenshots

Please refer to the above Youtube video.

Your setup (please complete the following information)

Unity Version 2021.3.5f1 (URP)
Graphics Tools Version 0.5.0(Introduced from MixedRealityFeatureTools)

Target platform (please complete the following information)

Only HoloLens 2

Additional context

I would like to understand the cause of the problem as I am curious about the causes in this area.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el shader de magnificación en Graphics Tools/Magnifier y reproduce el problema de orientación de UV en unas HoloLens 2 usando Unity 2021.3.5f1, URP, MRTK v2.8.2 y OpenXR. Compara la salida del dispositivo con el Editor y con el comportamiento de UV con la Y invertida descrito; se considera terminado cuando el magnificador se renderiza correctamente en HoloLens 2 y en VR sin cambios manuales en el código.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
unity
Área
ar-vr-xr, computer-graphics
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.