forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Found a bug in the GU samples

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
ufoz



Joined: 10 Nov 2005
Posts: 86
Location: Tokyo

PostPosted: Sun Sep 30, 2007 2:02 pm    Post subject: Found a bug in the GU samples Reply with quote

...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:
         float s = i + 0.5f;
         float t = j;

but i and j should be switched to
Code:
         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... :)
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group