PVR questions
-
- DC Developer
- Posts: 2285
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Fri Feb 21, 2003 7:37 am
- Location: Chicago, IL
- Has thanked: 0
- Been thanked: 1 time
- Contact:
PVR questions
I can't seem to find the article where I read this... the PVR system is nothing more than a tile/poly accelerator and does not automatically do depth perspective like GL does. Is this true? If is it, I would be able to use it for 2D stuff very easily, right? Also, are there any good tutorials or source that show a good example of using pvr? The kos examples don't seem like they cover everything. Thanks.
![Image](http://img159.imageshack.us/img159/5720/pub9.4651202415174E+27.png)
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
In order...
Yes, that's right. The PVR just does polygon rendering, although it does handle depth for sorting, depth testing, occulsion testing, and perspective correction for textures.
Yes, you can use it for 2D. Just draw polygons with 2D coordinates, and you could use the Z coordinate to control the order the graphics are drawn if you want.
No, there aren't really any good tutorials yet. To be honest, the PVR system isn't very well documented. The KOS examples are probably about as good as you're going to get.
Yes, that's right. The PVR just does polygon rendering, although it does handle depth for sorting, depth testing, occulsion testing, and perspective correction for textures.
Yes, you can use it for 2D. Just draw polygons with 2D coordinates, and you could use the Z coordinate to control the order the graphics are drawn if you want.
No, there aren't really any good tutorials yet. To be honest, the PVR system isn't very well documented. The KOS examples are probably about as good as you're going to get.
-
- DC Developer
- Posts: 2285
- Joined: Fri Feb 21, 2003 7:37 am
- Location: Chicago, IL
- Has thanked: 0
- Been thanked: 1 time
- Contact:
Thanks for the info.
Now, I notice that each pvr vertex has a z coordinate. So, let's say that I'm drawing a textured quad or something... what happens if I give a different z coord for each of the 4 vertices? How will that render when other polygons are rendered as well? Will pvr clip the polygons whose faces intersect sort of like there really was a non-depth-perspective 3D space? Or will it behave kinda weird? I suppose I can just compile a test and find out first hand but I was hoping you could anwser this without doing that. This question is just out of curiosity. My current project is all 2D anyways and polygons will always be "parallel" to the screen.
Thanks.
Now, I notice that each pvr vertex has a z coordinate. So, let's say that I'm drawing a textured quad or something... what happens if I give a different z coord for each of the 4 vertices? How will that render when other polygons are rendered as well? Will pvr clip the polygons whose faces intersect sort of like there really was a non-depth-perspective 3D space? Or will it behave kinda weird? I suppose I can just compile a test and find out first hand but I was hoping you could anwser this without doing that. This question is just out of curiosity. My current project is all 2D anyways and polygons will always be "parallel" to the screen.
Thanks.
![Image](http://img159.imageshack.us/img159/5720/pub9.4651202415174E+27.png)
-
- DCEmu User with No Life
- Posts: 3641
- Joined: Sat Feb 16, 2002 1:55 pm
- Has thanked: 0
- Been thanked: 0
Best low-level info PVR info around that I've seen is at Marcus Comstedt's site, though it's not in tutorial form. It's still quite informative if you intend to do any bit-banging or just want some insight into how the hardware looks at things.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
If you give vertices different Z values, it'll show what's closest to the camera.
On a PC graphics card, it uses a Z buffer. Whenever it draws a polygon, it writes the depth value to the Z buffer. Then, when another polygon is drawn, each pixel is only drawn if it's in front of the pixel that's already there. Unless, of course, you start mucking around with the depth compare settings...
A DC's graphics system is like that, but without the Z buffer. It sorts the polygons into the right order (back to front) and then only renders the one that's closest to the screen. It then does some other mystical voodoo (well, maths) to make it look like there actually is a Z buffer, even though there isn't one.
Basically, it does the same as it would in 3D, but it doesn't do any kind of perspective correction, or any other transformations for you.
On a PC graphics card, it uses a Z buffer. Whenever it draws a polygon, it writes the depth value to the Z buffer. Then, when another polygon is drawn, each pixel is only drawn if it's in front of the pixel that's already there. Unless, of course, you start mucking around with the depth compare settings...
A DC's graphics system is like that, but without the Z buffer. It sorts the polygons into the right order (back to front) and then only renders the one that's closest to the screen. It then does some other mystical voodoo (well, maths) to make it look like there actually is a Z buffer, even though there isn't one.
Basically, it does the same as it would in 3D, but it doesn't do any kind of perspective correction, or any other transformations for you.
-
- bleemcast! Creator
- Posts: 882
- Joined: Wed Oct 17, 2001 7:44 pm
- Location: Los Angeles, CA
- Has thanked: 0
- Been thanked: 0
- Contact:
-
- DC Developer
- Posts: 462
- Joined: Wed Oct 17, 2001 7:44 pm
- Has thanked: 0
- Been thanked: 0
-
- bleemcast! Creator
- Posts: 882
- Joined: Wed Oct 17, 2001 7:44 pm
- Location: Los Angeles, CA
- Has thanked: 0
- Been thanked: 0
- Contact:
Non-perspective correction results in the weird "warping" that you see on PS1 titles -- and don't see on N64 and most later hardware.
If you send polygons with appropriate 3D coordinates, they'll draw correctly -- and, infact, will auto-mipmap if you set it up that way.
All of which is best done by a full 3D transform pipeline to generate the correct values for all your coordinates.
Also, IIRC, you need to send 1/Z not Z.
Rand.
If you send polygons with appropriate 3D coordinates, they'll draw correctly -- and, infact, will auto-mipmap if you set it up that way.
All of which is best done by a full 3D transform pipeline to generate the correct values for all your coordinates.
Also, IIRC, you need to send 1/Z not Z.
Rand.