何が起きたか
Meta Quest Pro と MRTKv2 を組み合わせて環境構築したところ下記のエラーが発生。
Shader error in 'Mixed Reality Toolkit/Standard': Non system-generated input signature parameter () cannot appear after a system generated value. at line 775 (on ges3)
解消方法
Assets/MRTK/Shaders/MixedRealityStandard.shader を以下のように変更
MixedRealityStandard.shader:755行目
- fixed4 frag(v2f i, fixed facing : VFACE) : SV_Target
+ fixed4 frag(v2f i, bool facing : SV_IsFrontFace) : SV_Target
MixedRealityStandard.shader:956行目
- worldNormal = normalize(worldNormal) * facing;
+ worldNormal = normalize(worldNormal) * (facing ? 1.0 : -1.0);
MixedRealityStandard.shader:959行目
- worldNormal = normalize(i.worldNormal) * facing;
+ worldNormal = normalize(i.worldNormal) * (facing ? 1.0 : -1.0);
参考サイト
確認環境
- Unity 2021.3.9f1
- Mixed Reality Toolkit Examples 2.8.3
- Mixed Reality Toolkit Extensions 2.8.3
- Mixed Reality Toolkit Foundation 2.8.3
- Mixed Reality Toolkit Standard Assets 2.8.3
- Oculus XR Plugin 3.0.2
- Oculus Integration SDK 49.0