Files
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
..
2022-08-02 18:07:32 +09:00
2020-06-19 13:03:32 +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",
  }
}