mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-12 05:48:47 -05:00
Refactoring
This commit is contained in:
@@ -180,10 +180,17 @@ namespace VRM
|
||||
var texture = m.GetTexture(kv.Key);
|
||||
if (texture != null)
|
||||
{
|
||||
var value = kv.Key == "_BumpMap"
|
||||
? textureExporter.RegisterExportingAsNormal(texture)
|
||||
: textureExporter.RegisterExportingAsSRgb(texture, needsAlpha: kv.Key == "_MainTex")
|
||||
;
|
||||
var value = -1;
|
||||
var isNormalMap = kv.Key == "_BumpMap";
|
||||
if (isNormalMap)
|
||||
{
|
||||
value = textureExporter.RegisterExportingAsNormal(texture);
|
||||
}
|
||||
else
|
||||
{
|
||||
var needsAlpha = kv.Key == "_MainTex";
|
||||
value = textureExporter.RegisterExportingAsSRgb(texture, needsAlpha);
|
||||
}
|
||||
if (value == -1)
|
||||
{
|
||||
Debug.LogFormat("not found {0}", texture.name);
|
||||
|
||||
Reference in New Issue
Block a user