A downloadable tool for Windows

CyberVGA is a 3D software engine, runtime x86-64 JIT raytracer, and standalone C SDK I built from scratch. No Direct3D, Vulkan, or GPU raytracing APIs (OpenGL is used only as a display blit/upscale surface on Windows).

It started as a pure 1990s MS-DOS Mode X (320x240) software rasterizer written in C89 and NASM around Q16.16 fixed-point math. In v1.8.0, the Win64 build pairs that deterministic fixed-point simulation and octree pipeline with JITRay: a multi-threaded CPU raytracer that compiles the loaded level's octree, active volumes, and material shaders directly into native x86-64 machine code at runtime.

You can switch between the 32-bit x86-64 JIT raytracer and the classic 8-bit paletted software rasterizer on the fly with F7, or compare them side-by-side with F11 split-screen mode.


How the Engine Works Under the Hood

  • Direct-Threaded x86-64 JIT Octree Traversal (RAY_X64.C):
    When a level loads its pre-baked .COC (CyberOctree) sidecar file, the engine walks the flattened OctNode array once and emits native x86-64/SSE machine code into a VirtualAlloc executable buffer. There is no outer while loop, no node struct lookup, and no recursion stack at trace time—the CPU's instruction pointer (RIP) is the octree cursor. On a bounding-box hit, execution falls through to the next instruction (n + 1); on a miss, a baked relative jump (ja rel32, opcode 0x0F 0x87) jumps straight to the machine code block of nodes[skip_index].
  • Partial Evaluation & Unrolled Scene Stubs (RAYTRC.C):
    Instead of branching on empty arrays millions of times per second across worker threads, the JIT compiler specializes the hot path for the currently loaded map. If a map has 0 active fog volumes, liquid volumes, or particles, the JIT writes a single 0xC3 (ret) instruction at that pass's entry point. When N volumes are active, it unrolls N SSE slab checks back-to-back and pins the ray origin (xmm6) and inverse direction (xmm7) in registers across the entire traversal.
  • CPU Global Illumination via Fibonacci Sphere Probes (RAY_GI.C):
    Indirect bounce lighting is solved on the CPU using a 16 × 8 × 16 world-space grid of L1 Spherical Harmonics (SH) irradiance probes (2,048 probes total) paired with emissive Virtual Point Lights (VPLs). Each probe casts 16 rays distributed evenly across the unit sphere using a golden-angle Fibonacci lattice, blends updates temporally with EMA hysteresis, and evaluates per-material JIT bounce stubs with pre-baked albedo / π and emissive immediates (mov rax, imm64).
  • PBR Materials, Volumetric Fog & Refractive Liquids (RAY_PBR.C, FOGVOL.C, LIQVOL.C):
    Supports Cook-Torrance GGX microfacet specular, tangent-space normal mapping, recursive reflections, Beer-Lambert volumetric fog AABBs, and refractive water/liquid volumes with Snell's law ray bending, RGB absorption, animated surface waves, and underwater caustics.
  • Classic 8-Bit Software Rasterizer (OCTREE.C, VGA_SPAN.C):
    The original Q16.16 fixed-point rasterizer is still built right in: affine and 16-pixel perspective-correct span drawers, 1/z depth buffering, 64 × 256 LUT lighting with 4 × 4 Bayer ordered dithering, tri-planar UV mapping, and self-modifying x86 span emitters.
  • Deterministic Fixed-Point Physics & Raycast Vehicle Dynamics (PHYS.C, COLLIS.C, CAR.C):
    Multi-threaded capsule-vs-octree and capsule-vs-capsule collision resolution with 4-iteration wall sliding, plus a 4-wheel Hooke's law spring/damper raycast vehicle simulator—all running in Q16.16 fixed-point math.
  • AMD FSR 2.2 Temporal Upscaling (CFSR.C):
    Integrates FidelityFX Super Resolution 2.2 on Win64 with Halton sub-pixel camera jitter and analytical screen-space motion vectors for both static world geometry and vertex-animated .CMS/.CAN meshes.

What's Inside the Win64 SDK (v1.8.0)

The SDK ships as a self-contained distribution ready to run or link against your own C code:

  • bin\WALKER_WIN64.exe (WALKER.C): Standalone first-person walker example running on the 5-room showcase map (ASSTS\WORLD\SHWCSE.CWR), combining a Q16.16 capsule character controller with JITRay raytracing.
  • bin\VIEWER_WIN64.EXE: Standalone world viewer and benchmark runner (--tour, --benchmark, --raster, --no-gi, --fsr).
  • bin\CEDIT_WIN64.EXE (CyberEdit): Built-in 4-viewport world editor for authoring parametric brushes (Cube, Quad, Wedge, Prism), sculpting 64 × 64 terrain heightmaps and splatmaps, placing cone/point lights, fog/liquid volumes, and baking .COC octrees in real time.
  • bin\PONG_WIN64.exe (PONG.C): Minimal 2D arcade example demonstrating direct 8-bit framebuffer drawing and raw Sound Blaster PCM synthesis.
  • lib\libcvga.lib & include\: Static Win64 engine libraries (Release & Debug) with all third-party dependencies pre-bundled, full C headers, and JackInWIN64.bat for one-command compilation.
  • DOC\: Complete 8-volume developer manual (VOL0–VOL7) covering setup, fixed-point math, octree baking, rasterization, physics, entities, CyberEdit, and the full C API reference.

Quick Start & Controls

Run bin\WALKER_WIN64.exe or bin\VIEWER_WIN64.EXE from the SDK root:

  • W A S D + Mouse: Walk & Mouselook (Shift to sprint, Space to jump in WALKER_WIN64.exe)
  • 1 – 5: Teleport between the 5 rooms of the showcase map (SHWCSE.CWR)
  • F7: Toggle between x86-64 JITRay (32-bit raytracer) and 8-Bit Software Rasterizer
  • F8: Cycle AMD FSR 2.2 upscaling presets (Off, Native AA, Quality, Balanced, Performance, Ultra Perf)
  • F9: Toggle recursive specular reflections
  • F10: Toggle L1-SH Global Illumination probes + emissive VPLs
  • F11: Cycle split-screen comparison modes (8-Bit Raster vs JITRay, Direct Only vs Full GI + Reflections) — use , / . or Arrow Keys to slide the divider
  • V: Cycle diagnostic visualizers (3D L1-SH Probes + VPLs, GI Irradiance Map, Perturbed PBR Normals)
  • J: Toggle x86-64 native JIT kernel vs C fallback raytracer
  • T: Toggle automated cinematic camera tour (in VIEWER_WIN64.EXE)
  • Alt + = / -: Step internal render resolution up or down (320x240 up to 1280x960)

To compile your own C game or rebuild the included examples from an x64 Native Tools Command Prompt for VS 2022:

JackInWIN64.bat WALKER.C release
bin\WALKER_WIN64.exe
Updated 6 days ago
StatusReleased
CategoryTool
PlatformsWindows
Release date Aug 22, 2025
AuthorNovus Idea
Tags3D, fixed-point, Game engine, global-illumination, Level Editor, mode-x, MS-DOS, ray-tracing, software, vga
Average sessionAbout a half-hour
LanguagesEnglish
InputsKeyboard, Mouse
ContentNo generative AI was used

Download

Download
CVGA_1_8_SDK_WIN64.7z 86 MB
Download
CVGA_1_1_SDK_DOS.7z 36 MB

Install instructions

Win64 Package

  1. Download the CVGA_SDK_WIN64.7z archive
  2. Extract the contents
  3. Run:
    1. Run bin\VIEWER_WIN64.EXE — start the runtime + demo for shwcse.cwr
    2. Run bin\CEDIT_WIN64.EXE — start the world editor

DOS Package (DOSBox-X)

  1. Download the CVGA_SDK_DOS.7z archive
  2. Extract the contents
  3. Run:
    1. Run bin\VIEWER.EXE — start the runtime + demo for world.cwr
    2. Run bin\CEDIT.EXE — start the world editor

DOSBox-X is included. No extra configuration is required.

SDK Packages

For writing your own games:

  • Win64 SDK — contains the static library, headers, editor, Blender exporters, and JackInWIN64.bat build script. Open an x64 Native Tools Command Prompt and run the build script on your .c file.
  • DOS SDK — ready-to-run DOSBox-X environment with the engine and DJGPP toolchain already set up.

Here's a short video about how to compile and run classical Pong, source provided in both packages:


Development log

ImageImageImageImageImageImageImageImageImage