Fix the frame value for bfres texture pattern animatons in viewport.
This commit is contained in:
parent
2df06f463d
commit
8153975f2e
@ -650,9 +650,6 @@ namespace Bfres.Structs
|
||||
if (texture.SamplerName == samplerAnim.Text)
|
||||
{
|
||||
texture.textureState = STGenericMatTexture.TextureState.Animated;
|
||||
|
||||
Console.WriteLine($"Frame " + Frame);
|
||||
|
||||
texture.animatedTexName = samplerAnim.GetActiveTextureNameByFrame(Frame);
|
||||
}
|
||||
}
|
||||
|
@ -155,6 +155,7 @@ namespace FirstPlugin
|
||||
|
||||
var GXPaletteFormat = (Decode_Gamecube.PaletteFormats)palette.PaletteFormat;
|
||||
|
||||
Console.WriteLine($"GXPaletteFormat {GXPaletteFormat}");
|
||||
texWrapper.SetPaletteData(palette.Data, Decode_Gamecube.ToGenericPaletteFormat(GXPaletteFormat));
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,8 @@ namespace Toolbox.Library.Animations
|
||||
|
||||
public virtual string GetActiveTextureNameByFrame(float frame)
|
||||
{
|
||||
return MaterialAnimation.Textures[(int)GetValue(frame)];
|
||||
var keyFrame = GetKeyFrame(frame);
|
||||
return MaterialAnimation.Textures[(int)keyFrame.Value];
|
||||
}
|
||||
|
||||
public virtual void SetActiveTextureName(int Frame, string TextureName)
|
||||
|
Loading…
x
Reference in New Issue
Block a user