Fixup BOTW switch samplers

This commit is contained in:
KillzXGaming 2020-09-12 15:44:38 -04:00
parent ba0ac85543
commit f227f30e04

View file

@ -747,7 +747,7 @@ namespace FirstPlugin
Runtime.activeGame = Runtime.ActiveGame.MK8D;
}
if (Runtime.activeGame == Runtime.ActiveGame.MK8D || Runtime.activeGame == Runtime.ActiveGame.BOTW)
if (Runtime.activeGame == Runtime.ActiveGame.MK8D)
{
if (useSampler == "_a0" && AlbedoCount == 0)
{
@ -796,6 +796,37 @@ namespace FirstPlugin
texture.Type = MatTexture.TextureType.Shadow;
}
}
else if (Runtime.activeGame == Runtime.ActiveGame.BOTW) {
if (useSampler == "_a0")
{
m.HasDiffuseMap = true;
texture.Type = MatTexture.TextureType.Diffuse;
}
else if (useSampler == "_n0")
{
m.HasNormalMap = true;
texture.Type = MatTexture.TextureType.Normal;
}
else if (texture.SamplerName == "_e0")
{
m.HasEmissionMap = true;
texture.Type = MatTexture.TextureType.Emission;
}
else if (texture.SamplerName == "_ao0")
{
m.HasSpecularMap = true;
texture.Type = MatTexture.TextureType.AO;
}
else if (texture.SamplerName == "_s0")
{
m.HasSpecularMap = true;
texture.Type = MatTexture.TextureType.Specular;
}
else if (texture.SamplerName == "_gn0") //Damage
{
}
}
else if (mat.ShaderAssign.ShaderArchiveName == "ssg")
{
bool IsAlbedo0 = texture.SamplerName == "_a0";