Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback UnlitTransparentWithZWrite into MToon's emissive factor. #1255

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

Santarh
Copy link
Contributor

@Santarh Santarh commented Sep 28, 2021

UnlitTransparentWithZWrite は Unlit なので、Emissive に fallback させる。

@Santarh Santarh requested a review from ousttrue September 28, 2021 10:20
@ousttrue
Copy link
Contributor

#1139

@@ -17,7 +17,7 @@ public MaterialDescriptor Get(GltfData data, int i)
MaterialDescriptor matDesc;

// legacy "VRM/UnlitTransparentZWrite"
if (VRMZWriteMaterialImporter.TryCreateParam(data, m_vrm, i, out matDesc))
if (VRMUnlitTransparentZWriteMaterialImporter.TryCreateParam(data, m_vrm, i, out matDesc))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VRMUnlitTransparentZWriteMaterialImporter

matDesc.RenderQueue = MToon.Utils.GetRenderQueueRequirement(RenderMode.TransparentWithZWrite).DefaultValue;

// NOTE: Unlit のフォールバックなので、 Lit/Shade 色は黒とし、Emissive Factor に設定する.
// また、元のシェーダのうちユーザが設定できるプロパティは Texture のみ.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど。unlitemissive

@ousttrue ousttrue merged commit 22487c8 into vrm-c:master Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants