Skip to content

Commit

Permalink
Added a missing padding byte in the AlphaCompare struct and corrected…
Browse files Browse the repository at this point in the history
… TexGenSrc to Tex0 from TexCoord0 in a material's TexGen. Models are now compatible with J3DViewer.
  • Loading branch information
Sage-of-Mirrors committed Jan 11, 2018
1 parent e4a3874 commit 1bd45d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions SuperBMD/source/Materials/AlphaCompare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void Write(EndianBinaryWriter writer)
writer.Write(Reference1);
writer.Write((sbyte)-1);
writer.Write((short)-1);
writer.Write((short)-1);
}

public static bool operator==(AlphaCompare left, AlphaCompare right)
Expand Down
2 changes: 1 addition & 1 deletion SuperBMD/source/Materials/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void SetUpTev(bool hasTexture, bool hasVtxColor, int texIndex)
if (hasTexture)
{
// Generate texture stuff
AddTexGen(TexGenType.Matrix2x4, TexGenSrc.TexCoord0, Enums.TexMatrix.Identity);
AddTexGen(TexGenType.Matrix2x4, TexGenSrc.Tex0, Enums.TexMatrix.Identity);
AddTexMatrix(TexGenType.Matrix3x4, 0, OpenTK.Vector3.Zero, OpenTK.Vector2.One, 0, OpenTK.Vector2.Zero, OpenTK.Matrix4.Identity);
AddTevOrder(TexCoordId.TexCoord0, TexMapId.TexMap0, J3DColorChannelId.Null);
AddTexIndex(texIndex);
Expand Down

0 comments on commit 1bd45d2

Please sign in to comment.