mirror of
https://github.com/4sval/FModel.git
synced 2026-04-22 01:27:43 -05:00
less restriction on emission
This commit is contained in:
parent
98a40fc2f1
commit
7cff932a81
|
|
@ -1 +1 @@
|
|||
Subproject commit d8d7c9769133ad66a365ecadbe1bc5bfbf133432
|
||||
Subproject commit 807d471212cc7a5953223c337324943d0ae5281f
|
||||
|
|
@ -110,13 +110,19 @@ public class Section : IDisposable
|
|||
}
|
||||
|
||||
if (Parameters.HasTopEmissiveTexture &&
|
||||
Parameters.EmissiveColor is { A: > 0 } emissiveColor &&
|
||||
Parameters.Emissive is UTexture2D { IsVirtual: false } emissive)
|
||||
{
|
||||
var mip = emissive.GetFirstMip();
|
||||
TextureDecoder.DecodeTexture(mip, emissive.Format, emissive.isNormalMap, platform, out var data, out var colorType);
|
||||
Textures[3] = new Texture(_gl, data, (uint) mip.SizeX, (uint) mip.SizeY, colorType, emissive);
|
||||
EmissionColor = new Vector4(emissiveColor.R, emissiveColor.G, emissiveColor.B, emissiveColor.A);
|
||||
if (Parameters.EmissiveColor is { A: > 0 } emissiveColor)
|
||||
{
|
||||
EmissionColor = new Vector4(emissiveColor.R, emissiveColor.G, emissiveColor.B, emissiveColor.A);
|
||||
}
|
||||
else
|
||||
{
|
||||
EmissionColor = Vector4.One;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user