| View previous topic :: View next topic |
| Author |
Message |
turkeyman

Joined: 20 Oct 2004 Posts: 75 Location: Brisbane, Australia
|
Posted: Sat Jul 16, 2005 6:37 pm Post subject: Problems building proper projection matrices.. |
|
|
Hey everyone,
I'm trying to sort out my projection matrix but its giving me a little trouble, is there good docs about the transformation pipeline anywhere?
the guardband is throwing me a little too reguarding viewports and stuff.. and i'm having trouble figuring out what space the result of the projection should actually map to..
I'm building an ortho and a projection matrix similar to the calculations listed in the d3d docs and opengl. (RH/LH differences asside) but the resulting image on the screen appears as if its stretched over a much larger area than the visible screen..
the cube demo calculates its projection matrix almost the same as i am, and not surprisingly, that demo actually draw's a different image than the data building the matrix would have you think.. (when compared to the same thing running on ps/linux/xbox)
ie, i build an ortho matrix with an ortho range from 0,0 to 640x480.. when i render vertices, the top left point seems to be far above and left of the top left corder of the screen, likewise for the bottom right...
my perspective projections are the same, the rendered image is stretched to fix a larger area than the screen... so is the PSP fitting the result of the projection to the buardband or is there something i need to compensate for when building the matrices? what operations does the psp perform post projection?
again, a detailed description of the transformation pipeline would be really useful :)
thanks again guys! |
|
| Back to top |
|
 |
ector
Joined: 12 May 2005 Posts: 195
|
Posted: Sun Jul 17, 2005 3:57 am Post subject: |
|
|
| Yeah, chip-nat has his scaling factors wrong. In the VIEWPORT registers, he writes 480 and -272 where puzzle bobble writes 240 and -136, according to my emulator. Those values are what I use and they give correct dimensions. |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Sun Jul 17, 2005 6:26 am Post subject: |
|
|
| ector wrote: | | Yeah, chip-nat has his scaling factors wrong. In the VIEWPORT registers, he writes 480 and -272 where puzzle bobble writes 240 and -136, according to my emulator. Those values are what I use and they give correct dimensions. |
Good thing I read these forums, otherwise I would miss the bug-reports.. :) I'll fix sceGuViewport() right away, I'll just verify that I messed up like that first. ;) _________________ GE Dominator |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Sun Jul 17, 2005 6:50 am Post subject: |
|
|
Ok, sceGuViewport() has been fixed. This will break all the 3D-apps in development out these using pspgu, but better break them now than later. :)
I also updated all the samples using the transform-pipe to compensate for this new viewport. _________________ GE Dominator |
|
| Back to top |
|
 |
ector
Joined: 12 May 2005 Posts: 195
|
Posted: Sun Jul 17, 2005 6:54 am Post subject: |
|
|
| Hmm I meant to tell you about it, I thought I had, but I probably forgot :) |
|
| Back to top |
|
 |
|