mirror of
https://github.com/4sval/FModel.git
synced 2026-07-01 04:13:11 -05:00
another upscale case
This commit is contained in:
parent
5e334d82ca
commit
4f062fb58d
|
|
@ -540,7 +540,8 @@ namespace FModel.ViewModels
|
|||
case UTexture2D texture:
|
||||
{
|
||||
var filter = texture.GetOrDefault<FName>("Filter");
|
||||
SetImage(texture.Decode(), filter.IsNone ? null : filter.Text);
|
||||
var lodGroup = texture.GetOrDefault<FName>("LODGroup");
|
||||
SetImage(texture.Decode(), filter.IsNone ? null : filter.Text, lodGroup.IsNone ? null : lodGroup.Text);
|
||||
return true;
|
||||
}
|
||||
case UAkMediaAssetData:
|
||||
|
|
@ -589,12 +590,14 @@ namespace FModel.ViewModels
|
|||
return false;
|
||||
}
|
||||
|
||||
private void SetImage(SKImage img, string filter = null)
|
||||
private void SetImage(SKImage img, string filter = null, string lodGroup = null)
|
||||
{
|
||||
const int UPSCALE_SIZE = 512;
|
||||
SKData data;
|
||||
|
||||
if (filter != null && img.Width < UPSCALE_SIZE && img.Height < UPSCALE_SIZE && filter.EndsWith("TF_Nearest", StringComparison.Ordinal))
|
||||
if ((filter != null && filter.EndsWith("TF_Nearest", StringComparison.Ordinal) ||
|
||||
lodGroup != null && lodGroup.EndsWith("TEXTUREGROUP_Pixels2D", StringComparison.Ordinal)) &&
|
||||
img.Width < UPSCALE_SIZE && img.Height < UPSCALE_SIZE)
|
||||
{
|
||||
var width = img.Width;
|
||||
var heigth = img.Height;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user