Skip to content

URPサンプルプロジェクトへのインポート時にビルドエラーが出る #1137

Closed
@tsujimaru99

Description

バグについて

URPのプロジェクトテンプレートにUniVRMをImportするとビルドエラーとなりビルドができません。メッセージは下記の通りです。

Error building Player: Shader error in 'VRM10/MToon10': undeclared identifier 'i' at Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_forward_fragment.hlsl(48) (on d3d11)

※上記メッセージはUnity 2019.4.29 × UniVRM 0.79の組み合わせのものです。
※vrmc_materials_mtoon_forward_fragment.hlsl 48行目の記述内容は以下です。

UNITY_APPLY_FOG(i.fogCoord, col); 

再現方法

  1. UnityHubよりプロジェクトテンプレート「URP」を選択してサンプルシーンを生成
  2. unitypackageにてUniVRMをインポート
  3. ビルドする
  4. エラーメッセージ表示

期待する動作

URPでのUniVRMの利用
→プロジェクト側で回避すべき問題であればご指摘ください。

スクリーンショット

bugreport_uniVRM_20210809

環境情報

  • OS: [Windows 10]
  • Unity version: [Unity-2019.4.29 / Unity-2020.3.14f1]
  • UniVRM version: [0.66 / 0.78 / 0.79]

追加の状況・背景

vrmc_materials_mtoon_forward_fragment.hlsl
の該当箇所を見てみましたが、自力での解決が不可能でした・・

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions