Found a bug in the GU samples

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ufoz
Posts: 86
Joined: Thu Nov 10, 2005 2:36 am
Location: Tokyo
Contact:

Found a bug in the GU samples

Post by ufoz »

...stemming from the confusion of which loop index belongs to which kind of subdivision when generating vertices for a torus mesh.

In psp/sdk/samples/gu/common/geometry.c, lines 14 and 15 are

Code: Select all

			float s = i + 0.5f;
			float t = j;
but i and j should be switched to

Code: Select all

			float s = j + 0.5f;
			float t = i;
plus the same in most samples that have their own copy of the torus code: beginobject.c, celshading.c, rendertarget.c, and the cylinder gen code in morphskin.c and skinning.c.

(seems to be fixed already in timing.c, sprite.c and signals.c)

The problem isn't actually visible in any of the current samples, though, because none of them use different values for the number of slices and rows... But still... :)
Post Reply