onne
Joined: 29 Aug 2006 Posts: 24
|
Posted: Mon Dec 11, 2006 1:50 pm Post subject: Per-pixel 3d rendering...? |
|
|
Hi...
I wonder if anyone else has been trying to do per-pixel 3d rendering? ie. writing a phong shader or something similar.
I have written a routine for simple scanline conversion. But the performance already without any per pixel operations seems not to be very good ( 3~6fps with my test mesh (7800 verts, 13700 tris, single 128x128x32b texture) ).
I have not started optimize too much yet, as I'm pretty new to psp programming. I just wanted to hear if someone has tackled with the problem before, or has good pointers to start optimizing?
My scanline is currently storing a huge list of vertices, which is finally rendered using:
| Code: | sceGumDrawArray( GU_POINTS ...
| and I use Gum's matrix operations for rotations and translations.
The following optimizations I have thought possible so far when browsing through this website (if you have any opinions they might prove handy)
I don't know is it reasonable to write a scanline routine, but that was the only way I figured it's possible to do per-pixel shading.
I appreciate any opinions. : )
EDIT:
--------------------------------------------------------
Kind of related to this is my observation that there seems to be something weird with orthogonal projection. If I do this:
| Code: | | sceGumOrtho( 0, 480, 272, 0, -1, 1 ); |
to have my projection fit the screen, I seem to get empty lines just in the middle of the screen (y=127 & y=128)
However when I do the following, everything seems fine:
| Code: | | sceGumOrtho( 0, 480, 272+1, 0, -1, 1 ); |
|
|