mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
SwizzleRoughnessToGreen
This commit is contained in:
parent
84f5d4d605
commit
d4e2bf187f
|
|
@ -1 +1 @@
|
|||
Subproject commit 5b38fc685da2f574262d54639f687945660cdf00
|
||||
Subproject commit f3ad3b3093f2693604415fa94ce9a53bb5a5c3fa
|
||||
|
|
@ -393,11 +393,10 @@ public class CUE4ParseViewModel : ViewModel
|
|||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var l = ELog.Information;
|
||||
if (endpoint.Overwrite && File.Exists(endpoint.FilePath))
|
||||
{
|
||||
Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(endpoint.FilePath);
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
FLogger.Text($"Mappings pulled from '{endpoint.FilePath.SubstringAfterLast("\\")}'", Constants.WHITE, true));
|
||||
}
|
||||
else if (endpoint.IsValid)
|
||||
{
|
||||
|
|
@ -416,8 +415,6 @@ public class CUE4ParseViewModel : ViewModel
|
|||
}
|
||||
|
||||
Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(mappingPath);
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
FLogger.Text($"Mappings pulled from '{mapping.FileName}'", Constants.WHITE, true));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -429,10 +426,15 @@ public class CUE4ParseViewModel : ViewModel
|
|||
|
||||
var latestUsmapInfo = latestUsmaps.OrderBy(f => f.LastWriteTime).Last();
|
||||
Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(latestUsmapInfo.FullName);
|
||||
FLogger.Append(ELog.Warning, () =>
|
||||
FLogger.Text($"Mappings pulled from '{latestUsmapInfo.Name}'", Constants.WHITE, true));
|
||||
l = ELog.Warning;
|
||||
}
|
||||
}
|
||||
|
||||
if (Provider.MappingsContainer is FileUsmapTypeMappingsProvider m)
|
||||
{
|
||||
Log.Information($"Mappings pulled from '{m.FileName}'");
|
||||
FLogger.Append(l, () => FLogger.Text($"Mappings pulled from '{m.FileName}'", Constants.WHITE, true));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,21 @@ public class Material : IDisposable
|
|||
"Emissive 2 UV Positioning (RG)UpperLeft (BA)LowerRight",
|
||||
"EmissiveUVPositioning (RG)UpperLeft (BA)LowerRight"))
|
||||
EmissiveRegion = new Vector4(EmissiveUVs.R, EmissiveUVs.G, EmissiveUVs.B, EmissiveUVs.A);
|
||||
|
||||
if (Parameters.TryGetSwitch(out var swizzleRoughnessToGreen, "SwizzleRoughnessToGreen") && swizzleRoughnessToGreen)
|
||||
{
|
||||
foreach (var specMask in SpecularMasks)
|
||||
{
|
||||
specMask.SwizzleMask = new []
|
||||
{
|
||||
(int) PixelFormat.Red,
|
||||
(int) PixelFormat.Blue,
|
||||
(int) PixelFormat.Green,
|
||||
(int) PixelFormat.Alpha
|
||||
};
|
||||
specMask.Swizzle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user