Skip to content

About

Software 3D rasterizer and framebuffer renderer for Xbox 360 libXenon graphics programs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xenon-soft3d

xenon-soft3d is a compact software rasterizer for Xbox 360 homebrew built with libXenon. It renders into a linear back buffer, applies per-pixel depth testing, converts completed frames to the Xenos display framebuffer's 32×32 tiled layout, and flushes the result for scanout.

The renderer does not submit GPU draw commands or use the Xenos shader pipeline. Geometry, visibility, and lighting are computed by the CPU; Xenos is used for display scanout. This makes the library useful for graphics test programs and visual diagnostics that need a controlled framebuffer path independent of the hardware 3D command ring.

3D Pipes mode rendered on an Xbox 360 with the soft3d framebuffer path

The screenshot is a frame from a live Xbox 360 run of the 3D Pipes mode in the Xenos GPU Research screensaver collection. It is original-hardware output from the soft3d software-framebuffer path, not hardware-accelerated 3D and not a MEMEXPORT result.

Rendering features

  • Linear off-screen color buffer with complete-frame presentation
  • 16-bit per-pixel depth buffer
  • Native Xenos 32×32 tiled framebuffer addressing
  • Depth-tested filled disks
  • Depth-tested variable-radius tubes
  • Lit disk and tube variants using a compact precomputed sphere-normal table
  • Runtime display dimensions read from the libXenon display-information block

Projection and object transforms remain application-controlled. The included example implements a rotating, depth-shaded 3D Pipes visual using inexpensive per-vertex floating-point transforms.

Build

Install a working devkitXenon/libXenon toolchain, set DEVKITXENON, then run:

make

The build produces xenon-soft3d.elf and xenon-soft3d.elf32. The ELF32 image can be staged through the normal XeLL/libXenon payload workflow appropriate to your console.

To use the renderer in another payload, copy source/soft3d.c and source/soft3d.h into the payload's source directory and link with libxenon and libm.

API

s3d renderer;
s3d_init(&renderer);

s3d_clear(&renderer, s3d_rgb(0, 0, 0));
s3d_tube_lit(&renderer, x0, y0, z0, r0, x1, y1, z1, r1, 80, 130, 255);
s3d_disk_lit(&renderer, x1, y1, r1, z1, 80, 130, 255);
s3d_present(&renderer);

s3d_tube* accepts already-projected screen coordinates and interpolates radius and depth between the endpoints. Smaller depth values are nearer the camera.

Hardware status

The framebuffer renderer and the included Pipes application have run on original Xbox 360 hardware under XeLL/libXenon. The repository does not claim Xenia validation, retail-dashboard compatibility, or use of the hardware Xenos 3D pipeline.

License

MIT. See LICENSE.

About

Software 3D rasterizer and framebuffer renderer for Xbox 360 libXenon graphics programs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages