mirror of
https://github.com/4sval/FModel.git
synced 2026-06-21 15:30:05 -05:00
colored gta map
This commit is contained in:
parent
347b28cb52
commit
7033e57d8d
|
|
@ -333,16 +333,22 @@ namespace FModel.ViewModels
|
|||
var isRendering = !parameters.IsNull;
|
||||
if (isRendering)
|
||||
{
|
||||
if (parameters.Diffuse is UTexture2D diffuse)
|
||||
if (parameters.HasNoTopDiffuseTexture && parameters.DiffuseColor is { A: > 0 } diffuseColor)
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() => m.AlbedoColor = new Color4(diffuseColor.R, diffuseColor.G, diffuseColor.B, diffuseColor.A));
|
||||
}
|
||||
else if (parameters.Diffuse is UTexture2D diffuse)
|
||||
{
|
||||
var s = diffuse.Decode()?.Encode().AsStream();
|
||||
Application.Current.Dispatcher.Invoke(() => m.AlbedoMap = new TextureModel(s));
|
||||
}
|
||||
|
||||
if (parameters.Normal is UTexture2D normal)
|
||||
{
|
||||
var s = normal.Decode()?.Encode().AsStream();
|
||||
Application.Current.Dispatcher.Invoke(() => m.NormalMap = new TextureModel(s));
|
||||
}
|
||||
|
||||
if (parameters.Specular is UTexture2D specular)
|
||||
{
|
||||
var mip = specular.GetFirstMip();
|
||||
|
|
@ -531,13 +537,18 @@ namespace FModel.ViewModels
|
|||
SetProperty(ref _showMaterialColor, value);
|
||||
for (int i = 0; i < Group3d.Count; i++)
|
||||
{
|
||||
if (Group3d[i] is not MeshGeometryModel3D { Material: PBRMaterial material })
|
||||
if (Group3d[i] is not MeshGeometryModel3D { Material: PBRMaterial material } m)
|
||||
continue;
|
||||
|
||||
var index = B(i);
|
||||
material.RenderAlbedoMap = !_showMaterialColor;
|
||||
material.AlbedoColor = !_showMaterialColor ? Color4.White :
|
||||
new Color4(_table[C(index)] / 255, _table[C(index >> 1)] / 255, _table[C(index >> 2)] / 255, 1);
|
||||
|
||||
if (_showMaterialColor)
|
||||
{
|
||||
m.Tag = material.AlbedoColor;
|
||||
material.AlbedoColor = new Color4(_table[C(index)] / 255, _table[C(index >> 1)] / 255, _table[C(index >> 2)] / 255, 1);
|
||||
}
|
||||
else material.AlbedoColor = (Color4) m.Tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,28 +22,28 @@
|
|||
<TextBlock Text="{Binding Source={x:Static local:Constants.APP_VERSION}, StringFormat={}FModel {0}}" FontSize="15" FontWeight="500" Foreground="#9DA3DD" FontStretch="Expanded" />
|
||||
<TextBlock Text="Made with ♥ by Asval" FontSize="30" FontWeight="700" Foreground="#DAE5F2" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="History" FontSize="15" FontWeight="700" Foreground="#9DA3DD" FontStretch="Expanded" />
|
||||
<TextBlock Text="				" FontSize="25" FontWeight="700" Height="2" Foreground="Transparent" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<TextBlock FontSize="12" Foreground="#727272" TextWrapping="Wrap" Margin="0 0 0 30"
|
||||
Text="Since the release in March 2019, we've continuously added new features and improved old ones. It started as a simple UE4 file explorer to parse assets and, as things progressed, became really popular to datamine games and create items icons. FModel 4 is now the most complete and well-made version so far. It features dozens of settings for you to use to make FModel your own." />
|
||||
|
||||
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="Contributors" FontSize="15" FontWeight="700" Foreground="#9DA3DD" FontStretch="Expanded" />
|
||||
<TextBlock Text="				" FontSize="25" FontWeight="700" Height="2" Foreground="Transparent" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<TextBlock FontSize="12" Foreground="#727272" TextWrapping="Wrap" Margin="0 0 0 30"
|
||||
Text="With the help of Waddlesworth, Fabian, Maiky, GMatrix, Amr, Officer, Tiger, Mang0e, and a lot more, this project continues to exist. If you're making money off of FModel consider donating to sustain FModel's continued improvements." />
|
||||
|
||||
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="Donators" FontSize="15" FontWeight="700" Foreground="#9DA3DD" FontStretch="Expanded" />
|
||||
<TextBlock Text="				" FontSize="25" FontWeight="700" Height="2" Foreground="Transparent" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<TextBlock FontSize="12" Foreground="#727272" TextWrapping="Wrap" Margin="0 0 0 30"
|
||||
Text="TheGameVlog ♥, Quentin ♥, Maiky ♥, HYPEX ♥, Evan, VenomLeaks, JayKey, Fevers, Netu, Laggy, s0ll, RazTracker, Mikey, kyle, Yanteh, Shiina, SexyNutella, Alexander, Jinx, Tector, imatrix, LamZykoss, Frenzy Leaks, LlamaLeaks, XTigerHyperX, FunGames, WeLoveFortnite." />
|
||||
|
||||
Text="TheGameVlog ♥, Quentin ♥, Maiky ♥, HYPEX ♥, Evan, VenomLeaks, JayKey, Fevers, Netu, Laggy, s0ll, RazTracker, Mikey, kyle, Yanteh, Shiina, SexyNutella, Alexander, Jinx, koba, Tector, imatrix, LamZykoss, Frenzy Leaks, LlamaLeaks, xplore, XTigerHyperX, FunGames, WeLoveFortnite." />
|
||||
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="Powered by" FontSize="15" FontWeight="700" Foreground="#9DA3DD" FontStretch="Expanded" />
|
||||
<TextBlock Text="				" FontSize="25" FontWeight="700" Height="2" Foreground="Transparent" HorizontalAlignment="Center" />
|
||||
|
|
@ -51,4 +51,4 @@
|
|||
<TextBlock FontSize="12" Foreground="#727272" TextWrapping="Wrap" Margin="0 0 0 30"
|
||||
Text="CUE4Parse, BenBot, Fortnite-Api, AdonisUI, AvalonEdit, CSCore, NVorbis, VgmStream, RestSharp, Serilog, Discord, K4os.Compression.LZ4, Ookii.Dialogs, Newtonsoft.Json, ..." />
|
||||
</StackPanel>
|
||||
</adonisControls:AdonisWindow>
|
||||
</adonisControls:AdonisWindow>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user