mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 07:04:36 +00:00
CMDL : use the right tex coord target for dkctf
This commit is contained in:
parent
afe7ab3890
commit
d1820ba8f0
2 changed files with 6 additions and 3 deletions
|
@ -42,7 +42,7 @@ namespace DKCTF
|
|||
/// <summary>
|
||||
/// Gets a vertex list from the provided buffer and descriptor info.
|
||||
/// </summary>
|
||||
public static CMDL.CVertex[] LoadVertexBuffer(List<byte[]> buffers, int startIndex, CMDL.VertexBuffer vertexInfo, bool isLittleEndian)
|
||||
public static CMDL.CVertex[] LoadVertexBuffer(List<byte[]> buffers, int startIndex, CMDL.VertexBuffer vertexInfo, bool isLittleEndian, bool swapTexCoord)
|
||||
{
|
||||
var vertices = new CMDL.CVertex[vertexInfo.VertexCount];
|
||||
|
||||
|
@ -72,7 +72,10 @@ namespace DKCTF
|
|||
vertex.TexCoord0 = ReadData(reader, comp.Format).Xy;
|
||||
break;
|
||||
case CMDL.EVertexComponent.in_texCoord1:
|
||||
vertex.TexCoord0 = ReadData(reader, comp.Format).Xy;
|
||||
if (swapTexCoord)
|
||||
vertex.TexCoord0 = ReadData(reader, comp.Format).Xy;
|
||||
else
|
||||
vertex.TexCoord1 = ReadData(reader, comp.Format).Xy;
|
||||
break;
|
||||
case CMDL.EVertexComponent.in_texCoord2:
|
||||
vertex.TexCoord2 = ReadData(reader, comp.Format).Xy;
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace DKCTF
|
|||
if (!this.IsMPR)
|
||||
bufferID = j;
|
||||
|
||||
var vertices = BufferHelper.LoadVertexBuffer(vertexData, bufferID, vertexInfo, IsSwitch);
|
||||
var vertices = BufferHelper.LoadVertexBuffer(vertexData, bufferID, vertexInfo, IsSwitch, this.IsMPR);
|
||||
|
||||
//Read
|
||||
foreach (var mesh in Meshes)
|
||||
|
|
Loading…
Reference in a new issue