1
0
mirror of synced 2024-11-27 17:00:50 +01:00

Additional Sampler Compatibility (#692)

* Improved compatibility

* cleanup
This commit is contained in:
Aster 2024-09-22 14:01:04 -04:00 committed by GitHub
parent dc19c51b74
commit 93f33128d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -778,6 +778,7 @@ namespace FirstPlugin
m.HasNormalMap = true;
texture.Type = MatTexture.TextureType.Normal;
}
else if (texture.SamplerName == "_e0")
{
m.HasEmissionMap = true;
@ -795,9 +796,30 @@ namespace FirstPlugin
}
else if (texture.SamplerName == "_gn0") //Damage
{
}
}
// EOW Samplers
else if (useSampler == "_albedo0")
{
m.HasDiffuseMap = true;
texture.Type = MatTexture.TextureType.Diffuse;
}
else if (useSampler == "_metallic0")
{
m.HasMetalnessMap = true;
texture.Type = MatTexture.TextureType.Metalness;
}
else if (useSampler == "_normal0")
{
m.HasNormalMap = true;
texture.Type = MatTexture.TextureType.Normal;
}
else if (useSampler == "_smoothness0")
{
m.HasLightMap = true;
texture.Type = MatTexture.TextureType.Light;
}
}
else if (mat.ShaderAssign.ShaderArchiveName == "ssg" ||
mat.ShaderAssign.ShaderArchiveName == "rf4cmv")
{
@ -1041,6 +1063,7 @@ namespace FirstPlugin
m.HasEmissionMap = true;
texture.Type = MatTexture.TextureType.Emission;
}
else if (texture.SamplerName == "_s0" || useSampler == "_s0")
{
m.HasSpecularMap = true;
@ -1061,11 +1084,40 @@ namespace FirstPlugin
m.HasLightMap = true;
texture.Type = MatTexture.TextureType.Light;
}
else if (texture.SamplerName == "bake0")
{
m.HasShadowMap = true;
texture.Type = MatTexture.TextureType.Shadow;
}
// EOW Frag Samplers
else if (useSampler == "Albedo0")
{
m.HasDiffuseLayer = true;
texture.Type = MatTexture.TextureType.Diffuse;
}
else if (useSampler == "Normal0")
{
m.HasNormalMap = true;
texture.Type = MatTexture.TextureType.Normal;
}
else if (useSampler == "Emissive1")
{
m.HasEmissionMap = true;
texture.Type = MatTexture.TextureType.Emission;
}
else if (useSampler == "Smoothness0")
{
m.HasLightMap = true;
texture.Type = MatTexture.TextureType.Light;
}
else if (useSampler == "Metalness0")
{
m.HasMetalnessMap = true;
texture.Type = MatTexture.TextureType.Metalness;
}
}
texture.Name = TextureName;