From 9b4778fae72246a4f45f2e66dd01c2d2f8dcdf5a Mon Sep 17 00:00:00 2001 From: Briggs Baltzell Date: Sat, 7 Mar 2026 19:03:24 -0600 Subject: [PATCH] Update vertex attribute formats and streamline vertex function calls in `d_cloth_packet`. --- src/d/d_cloth_packet.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/d/d_cloth_packet.cpp b/src/d/d_cloth_packet.cpp index ccac2aa29..19b3c2ec4 100644 --- a/src/d/d_cloth_packet.cpp +++ b/src/d/d_cloth_packet.cpp @@ -188,9 +188,9 @@ void dCloth_packet_c::draw() { GXSetVtxDesc(GX_VA_POS, GX_INDEX8); GXSetVtxDesc(GX_VA_NRM, GX_INDEX8); GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT); - GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0); - GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0); - GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); #if VERSION == VERSION_DEMO { @@ -488,11 +488,12 @@ void dCloth_packet_c::plot() { float yPos = 0.0f; for (int y = 0; y < mHoistGridSize; y++) { GXPosition1x8(x + y * mFlyGridSize); - GXPosition1x8(x + y * mFlyGridSize); - GXPosition2f32(xPos, yPos); + GXNormal1x8(x + y * mFlyGridSize); + GXTexCoord2f32(xPos, yPos); + GXPosition1x8(xNext + y * mFlyGridSize); - GXPosition1x8(xNext + y * mFlyGridSize); - GXPosition2f32(xPos + xStep, yPos); + GXNormal1x8(xNext + y * mFlyGridSize); + GXTexCoord2f32(xPos + xStep, yPos); yPos += yStep; }