UniVRM/Assets/VRMShaders
Takayuki Matsuoka 935afcb80d Add new pseudo method NextFrameIfTimedOut to RuntimeOnlyAwaitCaller
This change adds (pseudo) method RuntimeOnlyAwaitCaller.NextFrameIfTimedOut()
which invokes NextFrame() if given time is elapsed.  Otherwise, it does nothing.

We'll be able to utilize this (pseudo) method to ease possible cause of spikes.

For example:

----
public class VRMImporterContext : ImporterContext {
  protected override async Task OnLoadHierarchy(IAwaitCaller awaitCaller, ...) {
    ...
    var blendShapeList = VRM.blendShapeMaster.blendShapeGroups;
    if (blendShapeList != null && blendShapeList.Count > 0) {
      foreach (var x in blendShapeList) {
        await awaitCaller.NextFrameIfTimeout();
        BlendShapeAvatar.Clips.Add(await LoadBlendShapeBind(awaitCaller, x, transformMeshTable));
      }
    }
    ...
  }
}
----

Note that this change doesn't add NextFrameIfTimeout() to IAwaitCaller to avoid
breaking change.  This limitation introduces extra (maybe unnecessarily) complexity.
2022-09-07 17:51:10 +09:00
..
Documentation add upm documentation for VRM and VRMShaders 2020-07-21 12:54:09 +09:00
GLTF Add new pseudo method NextFrameIfTimedOut to RuntimeOnlyAwaitCaller 2022-09-07 17:51:10 +09:00
VRM VRMShaders.PathObject を追加。 MigrationMenu で使う。 2022-06-02 17:56:36 +09:00
VRM10 MToon10にて、Android端末でUVスクロールがカクつく問題を修正 2022-03-16 15:57:54 +09:00
CHANGELOG.md add upm documentation for VRM and VRMShaders 2020-07-21 12:54:09 +09:00
CHANGELOG.md.meta add upm documentation for VRM and VRMShaders 2020-07-21 12:54:09 +09:00
Documentation.meta add upm documentation for VRM and VRMShaders 2020-07-21 12:54:09 +09:00
GLTF.meta Refactoring VRMShaders directory & asmdef 2021-04-08 20:19:37 +09:00
LICENSE.md add upm documentation for VRM and VRMShaders 2020-07-21 12:54:09 +09:00
LICENSE.md.meta add upm documentation for VRM and VRMShaders 2020-07-21 12:54:09 +09:00
package.json fix missing commit 2022-08-02 18:07:32 +09:00
package.json.meta add VRMShaders/package.json 2020-06-19 13:03:32 +09:00
README.md Export dialog のバリデーターを整理 2020-11-10 16:37:22 +09:00
README.md.meta add README in vrm and vrmshaders folder 2020-07-21 13:21:58 +09:00
VRM.meta Refactoring VRMShaders directory & asmdef 2021-04-08 20:19:37 +09:00
VRM10.meta Refactoring VRMShaders directory & asmdef 2021-04-08 20:19:37 +09:00

VRMShaders

VRM model's supported shaders in Unity.

Shader と関連するユーティリティを切り離したパッケージ。

含まれるシェーダー

UniUnlit

  • Gltfの Unlit に適合するようにした。Unlit シェーダー

MToon

UniGLTF.ShaderPropExporter.PreShaderPropExporter

Unityでは、ランタイムにMaterialのPropertyを列挙することができない。 Set/Get はできる。 事前に一覧を作成するユーティリティ。

UPM usage (Unity 2019.3.4f1~)

Window -> Package Manager -> Add package from git URL and paste https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders.

or add the package name and git URL in Packages/manifest.json:

{
  "dependencies": {
    "com.vrmc.vrmshaders": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders",
  }
}