VectorC {VU} Demo Programs
We have produced a few demos written in C/C++ which demonstrate the kind of applications which VectorC {VU} may be used for. The source is available and demonstrates the minimum of effort it requires to get good practical results. This page contains brief descriptions, stills and MPEG movies of the demos in action while the links to the source are only available to registered PlayStation®2 developers.
Demo Renderer New with version 2.3.
The renderer consists of:
-
Model converter to convert 3D models into the format the renderer uses (on Windows PC)
-
Routines to light, rotate and project vertices for drawing (on VU1 with VectorC{VU})
-
Routines to clip triangles at the edges of the screen clipping area (on VU1 with VectorC{VU})
-
Routines to calculate from bounding boxes whether an object should be drawn, culled or clipped (on VU0 in micro-mode with VectorC{VU})
|
|
|
|
Water Demo
This demo is a simple example which animates water droplet and wave effects. The program runs entirely on VU1. The features are as follows;
- Random water drops.
- Animated waves.
- Radiating ripples.
- Specular lighting.
Click here to see an MPEG movie of the Water Demo.
Click here to obtain the full source archive. |
|
|
|
Tree Demo
This demo is a more complex example which generates a forrest. The program runs entirely on VU1. The features are as follows;
- Two types of procedurally generated trees.
- Procedurally generated leaves.
- Level of Detail (LOD) on branches & leaves.
- Animated camera path.
Click here to see an MPEG movie of the Tree Demo.
Click here to obtain the full source archive. |
|
|
Pool Demo
This demo displays an animated 3D pool table with balls. The features are as follows;
- VU1 program draws table and balls.
- Balls drawn with Level of Detail.
- VU0 program calculates ball collision physics.
- Demonstrates vector unit program function calling techniques of VectorC {VU} 2.1+
Click here to see an MPEG movie of the Pool Demo.
Click here to obtain the full source archive. |
|
|
Bezier Demo
This is a VU1 demo which renders curved surfaces with a variable level of tessellation. The features are as follows;
- VU1 program takes bezier control points and outputs polygons directly to GS.
- EE program sends two models, teapot and bird, control data to VU1 program.
- Variable level of curve tesselation (interactive).
- Demonstrates using smarter VU1 rendering pipeline to cut down on DMA traffic and improve performance.
Click here to see an MPEG movie of the Pool Demo.
Click here to obtain the full source archive. |
|
|
The VU0 equation
The above graphical examples demonstate programs running on VU1. However the most untapped vector unit in the PlayStation®2 is VU0. Often this is used only with the occasional macro-mode instruction to accelerate FP operations on the EE. However programming VU0 in micro-mode with VectorC {VU} has several key advantages. It doesn't stall the EE, it can carry on doing work while the program is running simultaneously. It doesn't polute the EE instruction cache and it avoids performance problems with compilers which don't schedule in-line assembly.
VectorC {VU} 2.1 now has the ability to write functions on VU0 which may be called from your EE code as if they were local functions. This enables rapid porting of your FP/vector math C/C++ code off the EE, which offers dramatic improvements in performance. Further details on this important new feature of VectorC {VU} can be found in the PlayStation®2 NDA section, more below.
Note to Registered PlayStation®2 developers
If you have an account on the Codeplay web site, this may be upgraded to provide access to the PlayStation®2 NDA section which contains the source code for these demos for download and further technical information. See here for more.
PlayStation is a registered trademark of Sony Computer Entertainment Inc.
|