Help! Is DX8 THAT slow on 2D gfx ? Or am I?

Started by
9 comments, last by CondorWitte 23 years, 4 months ago
quote:Original post by Psychocatt

If you can do alpha blending and rotation on a 3d object with a 2d texture, why couldn''t the hardware do alpha blending and rotation on just a 2d texture? Doesn''t it have to do that when doing 3d?


What we usually mean by saying use the 3D hardware, is to use the graphics card rasteriser.

2D operations, i.e. Blits are, basically, done by straight DMA transfer of the data to and from the graphics card. Some cards can do a bit more, such as pixel conversion and simple scaling, but generally much slower.

3D operations are using modern 3D chipsets ability to draw textured triangles. This is at the base level what 3D cards do, and do very well - draw triangles. The difference is that the pixels in the triangle can be composed of various colours and textures so you can do alpha blending, lighting and multi-texturing.
Also, with triangles, you specify the texture coordinates of the 3 points, but the triangle can be drawn onscreen in any position and shape so you can do rotation, scaling, shearing etc.

You don''t actually have to do any 3D operations because you can specify the coordinates of the triangle in 2D screen coordinates. You have to use some sort of 3D API to access these features however, which puts most people off.

If you look at the Playstation architecture, there is no Blit command. Data is transferred to video memory by straight regtangular DMA - This is the ONLY way to write to video memory directly. To draw 2D sprites, you use the 3D hardware to draw a textured quad (two triangles stuck together). This means that all sprites can be alpha blended and coloured for free. Rotation and scaling only produces a minor overhead for calculating the screen coordinates of the corners, but otherwise draws at the same speed (although drawing more pixels obviously takes longer).

This topic is closed to new replies.

Advertisement