microsoft / microsoft/MixedReality-GraphicsTools-Unity
UV flips up and down on HoloLens2 real device in magnifier function.
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 209
- フォーク
- 49
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
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;
}
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Graphics Tools/Magnifier の拡大鏡シェーダーから始め、Unity 2021.3.5f1、URP、MRTK v2.8.2、OpenXR を使用して HoloLens 2 上で UV の向きの問題を再現します。デバイスの出力を Editor と比較し、報告されている Y 軸反転 UV の挙動も比較します。手動でコードを変更せずに HoloLens 2 と VR で拡大鏡が正しくレンダリングされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- unity
- 領域
- ar-vr-xr, computer-graphics
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100