AddPrim, GsSortObject4 and Z problem
Posted: April 25th, 2021, 1:27 am
Hello guys, I have a little problem.
I'm using AddPrism to draw a simple vertex array and GsSortObject4 to draw vertices from TMD file.
Ok, nice.
Except the polygons drawn by AddPrism always get behind the polygons drawn by GsSortObject4, no matter if I move the z axis forward or backward.
My draw rotine is the following:
...
if ((OT_z > 0) && (OT_z < (1 << OT_LENGTH)))
AddPrim(&OT_TAGs[currBuffer][OT_z - 2], &f3[currBuffer]);
...
GsSortObject4(spr->obj, spr->ot, 14 - OT_LENGTH, getScratchAddr(0));
...
GsDrawOt(&OTs[currBuffer]);
Somebody can help me?
Thanks.
I'm using AddPrism to draw a simple vertex array and GsSortObject4 to draw vertices from TMD file.
Ok, nice.
Except the polygons drawn by AddPrism always get behind the polygons drawn by GsSortObject4, no matter if I move the z axis forward or backward.
My draw rotine is the following:
...
if ((OT_z > 0) && (OT_z < (1 << OT_LENGTH)))
AddPrim(&OT_TAGs[currBuffer][OT_z - 2], &f3[currBuffer]);
...
GsSortObject4(spr->obj, spr->ot, 14 - OT_LENGTH, getScratchAddr(0));
...
GsDrawOt(&OTs[currBuffer]);
Somebody can help me?
Thanks.