Fixing 16bit bone weights and FMaterialInput converter
Some checks failed
FModel QA Builder / build (push) Has been cancelled

This commit is contained in:
LongerWarrior 2025-05-08 00:55:28 +03:00
parent 037058da52
commit cc2ff71759
3 changed files with 6 additions and 5 deletions

@ -1 +1 @@
Subproject commit 784b39afcec3d906f9830cc051c0d21378d02ebf
Subproject commit 340b7567fdc2ca050d9042389d09540be1044159

View File

@ -606,6 +606,7 @@ public class CUE4ParseViewModel : ViewModel
case "csv":
case "pem":
case "tps":
case "tgs": // State of Decay 2
case "lua":
case "js":
case "po":
@ -656,7 +657,7 @@ public class CUE4ParseViewModel : ViewModel
{
var archive = entry.CreateReader();
var wwise = new WwiseReader(archive);
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(wwise, Formatting.Indented), saveProperties, updateUi);
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(wwise, Formatting.Indented), saveProperties, updateUi);
foreach (var (name, data) in wwise.WwiseEncodedMedias)
{
SaveAndPlaySound(entry.Path.SubstringBeforeWithLast('/') + name, "WEM", data);

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -163,8 +163,8 @@ public abstract class UModel : IRenderableModel
int max = skelVert.Influences.Count;
for (int j = 0; j < 8; j++)
{
var boneID = j < max ? skelVert.Influences[j].Bone : (short) 0;
var weight = j < max ? skelVert.Influences[j].RawWeight : (byte) 0;
var boneID = j < max ? skelVert.Influences[j].Bone : (ushort) 0;
var weight = j < max ? skelVert.Influences[j].RawWeight : (ushort) 0;
// Pack bone ID and weight
Vertices[baseIndex + count++] = (boneID << 16) | weight;