Skip to content

Commit d5e1c41

Browse files
committed
Minor renderer and root cloner fixes.
1 parent aa1e0f8 commit d5e1c41

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

xivModdingFramework/Models/ModelTextures/ModelTexture.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,9 @@ private static ShaderMapperDelegate GetShaderMapper(CustomModelColors colors, Xi
824824
var bonusColor = GetSkinBonusColor(mtrl, colors);
825825
var highlightColor = GetSkinBonusColor2(mtrl, colors);
826826
var metalnessConst = 1 - GetFloatConst(mtrl, 0x59BDA0B1, 1.0f);
827+
var isHroth = mtrl.ShaderKeys.FirstOrDefault(x => x.KeyId == 0x380CAED0 && x.Value == 0x57FF3B64) != null;
827828

828-
return (Color4 diffuse, Color4 normal, Color4 mask, Color4 index) => {
829+
return (Color4 diffuse, Color4 normal, Color4 mask, Color4 index) => {
829830
var roughness = 0.0f;
830831
var metalness = metalnessConst;
831832
var occlusion = 1.0f;
@@ -888,6 +889,11 @@ private static ShaderMapperDelegate GetShaderMapper(CustomModelColors colors, Xi
888889
var alpha = diffuse.Alpha * alphaMultiplier;
889890
alpha = allowTranslucency ? alpha : (alpha < 1 ? 0 : 1);
890891

892+
if (isHroth)
893+
{
894+
alpha = 1.0f;
895+
}
896+
891897
var emissive = emissiveColorMul;
892898
var sss = mask.Blue;
893899

xivModdingFramework/Mods/RootCloner.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,13 @@ private static string UpdateFileName(XivDependencyRoot Source, XivDependencyRoot
723723
dstSlot = srcSlot + dstSlot;
724724
}
725725

726-
file = file.Replace(srcSlot, dstSlot);
726+
if (!string.IsNullOrWhiteSpace(srcSlot))
727+
{
728+
file = file.Replace(srcSlot, dstSlot);
729+
} else if(!string.IsNullOrWhiteSpace(dstSlot))
730+
{
731+
file = file.Replace(match.Groups[0].Value, match.Groups[0].Value + "_" + dstSlot);
732+
}
727733
}
728734

729735

0 commit comments

Comments
 (0)