Skip to content

Commit

Permalink
update schema done
Browse files Browse the repository at this point in the history
  • Loading branch information
ousttrue committed Aug 6, 2021
1 parent cc89cb1 commit dd31a7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public static bool TryExportMaterialAsMToon(Material src, ITextureExporter textu
mtoon.ShadingToonyFactor = context.ShadingToonyFactor;

// GI
// TODO: update schema
mtoon.GiEqualizationFactor = context.GiEqualizationFactor;

// Emission
Expand Down
11 changes: 5 additions & 6 deletions Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ public static bool TryCreateParam(GltfData data, int i, out MaterialDescriptor m
// Rendering
var alphaMode = GetMToon10AlphaMode(material);
{
yield return (MToon10Prop.AlphaMode.ToUnityShaderLabName(), (float) alphaMode);
yield return (MToon10Prop.AlphaMode.ToUnityShaderLabName(), (float)alphaMode);
}

var transparentWithZWrite = GetMToon10TransparentWithZWriteMode(material, mToon);
{
yield return (MToon10Prop.TransparentWithZWrite.ToUnityShaderLabName(), (float) transparentWithZWrite);
yield return (MToon10Prop.TransparentWithZWrite.ToUnityShaderLabName(), (float)transparentWithZWrite);
}

var cutoff = material?.alphaCutoff;
Expand All @@ -127,12 +127,12 @@ public static bool TryCreateParam(GltfData data, int i, out MaterialDescriptor m
var renderQueueOffset = mToon?.RenderQueueOffsetNumber;
if (renderQueueOffset.HasValue)
{
yield return (MToon10Prop.RenderQueueOffsetNumber.ToUnityShaderLabName(), (float) renderQueueOffset);
yield return (MToon10Prop.RenderQueueOffsetNumber.ToUnityShaderLabName(), (float)renderQueueOffset);
}

var doubleSidedMode = GetMToon10DoubleSidedMode(material, mToon);
{
yield return (MToon10Prop.DoubleSided.ToUnityShaderLabName(), (float) doubleSidedMode);
yield return (MToon10Prop.DoubleSided.ToUnityShaderLabName(), (float)doubleSidedMode);
}

// Lighting
Expand Down Expand Up @@ -164,7 +164,6 @@ public static bool TryCreateParam(GltfData data, int i, out MaterialDescriptor m
var giEqualization = mToon?.GiEqualizationFactor;
if (giEqualization.HasValue)
{
// TODO: Update schema
yield return (MToon10Prop.GiEqualizationFactor.ToUnityShaderLabName(), giEqualization.Value);
}

Expand Down Expand Up @@ -192,7 +191,7 @@ public static bool TryCreateParam(GltfData data, int i, out MaterialDescriptor m
// Outline
var outlineMode = GetMToon10OutlineWidthMode(material, mToon);
{
yield return (MToon10Prop.OutlineWidthMode.ToUnityShaderLabName(), (float) outlineMode);
yield return (MToon10Prop.OutlineWidthMode.ToUnityShaderLabName(), (float)outlineMode);
}

var outlineWidth = mToon?.OutlineWidthFactor;
Expand Down

0 comments on commit dd31a7d

Please sign in to comment.