Skip to content

Commit 36cbad1

Browse files
committed
- Skin and Lip Color Influence calculations updated.
- Removed an extraneous expensive no-op from the modlist.
1 parent 29e8c5b commit 36cbad1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

xivModdingFramework/Models/ModelTextures/ModelTexture.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,18 +541,22 @@ private static void ComputeShaderColors(CustomModelColors colors, ShaderInfo in
541541

542542
// New diffuse starts from regular diffuse file.
543543
// Then factors in the player's skin color multiplied by the shader value.
544-
float skinInfluence = ByteToFloat(baseSpecular.R) * 0.5f;
545-
Color skinColor = MultiplyColor(colors.SkinColor, 1.0f);
544+
float skinInfluence = ByteToFloat(baseSpecular.R);
545+
var coloredSkin = MultiplyColor(baseDiffuse, colors.SkinColor);
546546

547-
newDiffuse = Blend(baseDiffuse, skinColor, skinInfluence);
547+
newDiffuse = Blend(baseDiffuse, coloredSkin, skinInfluence);
548548

549549
if (info.Preset == MtrlShaderPreset.Face)
550550
{
551551
// Face shaders also allow for lip color.
552-
Color lipColor = MultiplyColor(colors.LipColor, 1.0f);
552+
var coloredLip = MultiplyColor(baseDiffuse, colors.LipColor);
553553
float lipInfluence = ByteToFloat(baseSpecular.B);
554-
newDiffuse = Blend(newDiffuse, lipColor, lipInfluence);
555-
554+
newDiffuse = Blend(newDiffuse, coloredLip, lipInfluence);
555+
556+
// For lipstick, increase the specular value slightly.
557+
float specAmp = 1.0f + (lipInfluence * 0.25f);
558+
newSpecular = MultiplyColor(newSpecular, specAmp);
559+
556560
}
557561

558562

0 commit comments

Comments
 (0)