mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-12 05:48:47 -05:00
Don't export alpha channel if alphaMode was not opaque in vrm1.0
This commit is contained in:
@@ -42,7 +42,7 @@ namespace UniVRM10
|
||||
// Lighting
|
||||
dst.pbrMetallicRoughness = new glTFPbrMetallicRoughness();
|
||||
dst.pbrMetallicRoughness.baseColorFactor = context.BaseColorFactorSrgb.ToFloat4(ColorSpace.sRGB, ColorSpace.Linear);
|
||||
var baseColorTextureIndex = textureExporter.RegisterExportingAsSRgb(context.BaseColorTexture, needsAlpha: true);
|
||||
var baseColorTextureIndex = textureExporter.RegisterExportingAsSRgb(context.BaseColorTexture, context.AlphaMode != MToon10AlphaMode.Opaque);
|
||||
if (baseColorTextureIndex != -1)
|
||||
{
|
||||
dst.pbrMetallicRoughness.baseColorTexture = new glTFMaterialBaseColorTextureInfo
|
||||
|
||||
Reference in New Issue
Block a user