SkillAgentSearch skills...

SpartanEngine

A game engine with a fully bindless, GPU-driven renderer featuring real-time path-traced global illumination, hardware ray tracing, and a physics simulation running at 200Hz, built over 10+ years of R&D

Install / Use

/learn @PanosK92/SpartanEngine

README

<p align="center"> <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/data/textures/banner.bmp" alt="Spartan Engine"/> </p> <p align="center"> <strong>A game engine with a fully bindless, GPU-driven renderer featuring real-time path-traced global illumination, hardware ray tracing, and a physics simulation running at 200Hz, built over 10+ years of R&D</strong> </p> <p align="center"> <a href="https://github.com/PanosK92/SpartanEngine/actions"><img src="https://github.com/PanosK92/SpartanEngine/actions/workflows/workflow.yml/badge.svg" alt="Build Status"></a> <a href="https://discord.gg/TG5r2BS"><img src="https://img.shields.io/discord/677302405263785986?logo=discord&label=Discord&color=5865F2&logoColor=white" alt="Discord"></a> <a href="https://github.com/PanosK92/SpartanEngine/blob/master/license.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a> </p> <p align="center"> <a href="https://discord.gg/TG5r2BS">Discord</a> • <a href="https://x.com/panoskarabelas">X</a> • <a href="https://github.com/PanosK92/SpartanEngine/wiki">Wiki</a> • <a href="https://github.com/PanosK92/SpartanEngine/issues">Issues</a> </p>

The Engine

Spartan started as a university project and has been in active development for over a decade, growing into a community of 600+ members on Discord, including industry professionals sharing knowledge and pushing boundaries together. Its rendering technology has been adopted by Godot Engine and S.T.A.L.K.E.R. Anomaly, and featured in a published programming book.

There's a destination that gives all this tech a purpose. Curious? Read the plan →


See It In Action

Engine Trailer


Worlds

<img align="left" width="420" src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_selection_4.png"/>

Launch the engine and choose from a selection of default worlds. Each is physics-enabled—walk around, pick up objects with your mouse, or take a car for a spin.

<br clear="left"/>

Forest

<img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_forest.jpg"/>

The most demanding world: 256 million procedurally generated grass blades (inspired by Ghost of Tsushima), spanning 64.1 km² covered with thousands of trees and rocks.

More Worlds

| Sponza 4K | Cornell Box | |:-:|:-:| | <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_sponza.png"/><br>Classic Dubrovnik building—ideal for path tracing | <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_cornell.jpg"/><br>Classic ray tracing test scene |

| San Miguel | Liminal Space | |:-:|:-:| | <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_san_miguel.jpg"/><br>Detailed courtyard scene with complex geometry and lighting | <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_liminal.jpg"/><br>Reality shifts to a nearby frequency |

| Showroom | The Plan | |:-:|:-:| | <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_showroom.png"/><br>Clean showcase—no experimental tech | <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_car_playground.png"/><br>A neon-soaked city, built to push the engine toward real-time path-traced driving through rain-slicked streets at 60fps, that's the plan. |


Rendering

The renderer is built around a single principle: the GPU owns the data. Every resource (geometry, materials, textures, lights, transforms, AABBs) lives in persistent, globally accessible buffers. There are no per-draw descriptor set updates, no per-draw resource binding, and no CPU-side draw loops.

Architecture

  • Zero-binding draw path, all per-draw data is stored in a single bindless storage buffer, push constants carry only a 4-byte index into it, keeping the entire push constant footprint at 80 bytes
  • Single global vertex and index buffer for all geometry, inspired by id Tech, with vertex pulling (vertex shaders fetch directly from bindless StructuredBuffers, bypassing the fixed-function Input Assembler), the same buffers are shared by rasterization and ray tracing
  • GPU-driven indirect rendering, a compute shader performs frustum and occlusion culling entirely on the GPU, emitting a compacted indirect argument buffer, the CPU issues a single DrawIndexedIndirectCount per pass, replacing thousands of individual draw calls
  • Bindless materials, lights, and samplers, all accessed through global descriptor arrays with no per-object binding
  • Uber shaders, minimal pipeline state object (PSO) permutations eliminate draw call state changes
  • Universal HLSL, all shaders are written once in HLSL and compiled for both Vulkan (via SPIR-V) and DirectX 12
  • Tightly packed 10-byte instance format for hundreds of millions of instances (procedural grass, foliage)
  • On-the-fly GPU mip generation (FidelityFX SPD) and GPU texture compression (Compressonator compute shaders), assets are compressed on the GPU at load time in milliseconds, not baked offline
  • Unified deferred rendering with transparency, opaque and transparent surfaces share the same BSDF and render path, no separate forward pass
  • Async compute, SSAO, screen-space shadows, and cloud shadows run on the compute queue in parallel with shadow map rasterization, synchronized via timeline semaphores

Lighting and Global Illumination

  • ReSTIR path tracing, reservoir-based spatiotemporal resampling for real-time multi-bounce global illumination, denoised via NVIDIA ReLAX (NRD)
  • Ray-traced reflections and shadows via hardware ray queries
  • Atmospheric scattering with real-time filtering and image-based lighting with bent normals
  • Volumetric fog with temporal reprojection
  • Volumetric clouds with procedural noise generation and shadow casting
  • Screen-space shadows (inspired by Days Gone) and ambient occlusion (XeGTAO with visibility bitfield)
  • Shadow map atlas with fast filtering and penumbra estimation

Performance and Upscaling

  • GPU-driven frustum and occlusion culling (Hi-Z), the CPU never touches per-object visibility
  • Variable rate shading and dynamic resolution scaling
  • Upscaling with Intel XeSS 2 and AMD FSR 3
  • Temporal anti-aliasing and FXAA
  • Custom breadcrumbs for GPU crash tracing and post-mortem debugging

Camera and Post-Processing

  • Physically based camera with auto-exposure and physical light units (lumens and kelvin)
  • Tonemappers: ACES, AgX, Gran Turismo 7 (default)
  • HDR10 output
  • Bloom, motion blur, depth of field, chromatic aberration, film grain, sharpening (CAS)

Car Simulation

A full vehicle dynamics simulation running at 200Hz within the PhysX fixed-timestep loop.

| System | Details | |--------|---------| | Tires | Pacejka magic formula with MF 5.2 combined slip, load sensitivity, 3-zone surface + core thermal model, tire pressure, wear, per-axle dimensions, relaxation length, camber thrust, multiple surfaces | | Suspension | Convex hull sweep contact, spring-damper with separate front/rear damping, anti-roll bars, progressive bump stops, bump steer, camber/toe alignment | | Weight transfer | Geometric + elastic lateral split via roll center heights, roll-stiffness-based front/rear distribution | | Drivetrain | Engine torque curve, turbo/wastegate, 7-speed auto/manual gearbox, rev-match downshifts, driveshaft torsional compliance, open/locked/LSD differentials, RWD/FWD/AWD | | Brakes | Thermal model with fade, front/rear bias, ABS with slip-threshold modulation | | Aerodynamics | Drag, front/rear downforce, ground effect, DRS, pitch/yaw sensitivity, rolling resistance | | Steering | Ackermann geometry, high-speed reduction, self-aligning torque | | Assists | ABS, traction control, handbrake | | Integration | Semi-implicit Euler for wheel spin, consolidated net-torque per wheel | | Input | Controllers with analog throttle/brake/steering, haptic feedback | | Camera | GT7-inspired chase camera with speed-based dynamics and orbit controls |


Engine Systems

| System | Details | |--------|---------| | Particles | GPU-driven particle system component with compute-shader emission, simulation, and rendering, screen-space depth-buffer collision, and soft blending | | Animation | Skeletal animation: hierarchical skeletons, keyframed clips (translation, rotation, scale), per-mesh skeletal binding with four-bone vertex skinning, binary engine asset format | | Physics | PhysX integration with rigid bodies, character kinematics, and vehicle physics | | Scripting | Lua 5.4 with full engine API access (entities, components, math, physics, audio) via Sol2 bindings with lifecycle callbacks (Start, Tick, Save, Load) | | Audio | 3D positional audio, streaming, reverb, and procedural synthesis via SDL3, supports WAV, OGG, MP3, FLAC, and more | | Input | Keyboard, mouse, controllers, and steering wheels with haptic feedback | | Entity system | Component-based architecture with transform hierarchies, prefabs, and XML serialization | | Threading | Custom thread pool with hardware-aware scaling, parallel loops, nested parallelism detection, and progress tracking | | VR (WIP) | OpenXR with Vulkan multiview single-pass stereo rendering, per-eye view/projection matrices, full pipeline coverage (geometry, lighting, reflections, post-processing) | | Profiling | Nsight/RGP-style timeline profiler wi

Related Skills

View on GitHub
GitHub Stars3.0k
CategoryDevelopment
Updated2h ago
Forks259

Languages

C++

Security Score

100/100

Audited on Mar 20, 2026

No findings