Chess RTX is a playable chess presentation built in Rust. The image is generated by a native
Vulkan ray-tracing pipeline (VK_KHR_ray_tracing_pipeline); wgpu presents the image and egui
provides the game and material controls.
The renderer uses the bundled high-detail, CC BY 4.0 Staunton meshes by Jeyhun1985 from Sketchfab and retains procedural pieces as an automatic fallback if those assets are unavailable. Piece and board shaders support ceramic, anisotropic metal, and frosted dielectric materials, with recursive reflections, refraction, soft ray-traced shadows, and a caustic contribution for transmissive pieces.
VK_KHR_acceleration_structure and VK_KHR_ray_tracing_pipelineThe repository includes all six optimized meshes in assets/staunton/; no separate download or
Sketchfab account is required. Set CHESS_RTX_ASSET_DIR only if you want to use a different mesh
directory.
The mesh adaptations remain licensed under CC BY 4.0 rather than the project's software license. See asset attribution for the artist, individual source links, license, and a description of the geometry adaptations.
The interactive chess diagram uses Cburnett's standard 45×45 SVG chess-piece set from Wikimedia Commons. The vectors are rasterized at the display's native pixel size so they stay sharp on HiDPI screens. They are distributed under the BSD 3-Clause option offered by the original author; see 2D artwork attribution for sources, modifications, and the full license notice.
cargo run --release
Click a piece and then a highlighted destination to move. Drag the render to orbit, use the wheel to zoom, and use the control panel to edit the light/dark pieces and board independently. The interactive renderer automatically selects 1–16 rays per pixel to keep each full-resolution pass near the display's measured refresh interval. Ray tracing and readback run on a background thread, so a long pass does not block input or the vsynced UI loop. Passes are accumulated in linear HDR space and tone-mapped only for display; adaptive sampling can be disabled in the Optics controls.
For an offscreen render that does not create a window:
cargo run --release -- --headless renders/opening.png \
--width 1280 --height 800 --samples 4 --passes 256
Headless renders accept the same presets used by the UI, for example
--light-style glass --dark-style ceramic --board-style metal. --passes averages independent
progressive passes in linear HDR space for low-noise output.
Render an arbitrary position:
cargo run --release -- --headless position.png \
--fen 'r1bq1rk1/ppp2ppp/2np1n2/8/2B1P3/2N2N2/PPPP1PPP/R1BQ1RK1 b - - 2 7'
Run the CPU-side tests with cargo test.
New game: restore the standard positionUndo: restore the previous positionSave PNG: save the current frame in renders/Load FENsrc/rt.rs: Vulkan device, BLAS/TLAS, shader binding table, ray dispatch, and readbacksrc/assets.rs: glTF import, mesh simplification, native asset format, and runtime asset loadingsrc/board_pieces.rs: embedded, resolution-independent artwork for the interactive 2D boardsrc/scene.rs: licensed-piece integration, procedural fallback meshes, and board scenesrc/material.rs: editable GPU material and camera settingssrc/chess_game.rs: legal move interaction backed by the chess move generatorsrc/app.rs: wgpu-backed egui application and refresh-rate sampling policysrc/render_worker.rs: coalescing background thread for Vulkan rendering and readbackshaders/: GLSL ray generation, closest-hit, and miss stages compiled to SPIR-V at build time8 commits
Rust
94.6%
GLSL
5.4%
Chess RTX is a playable chess presentation built in Rust. The image is generated by a native
Vulkan ray-tracing pipeline (VK_KHR_ray_tracing_pipeline); wgpu presents the image and egui
provides the game and material controls.
The renderer uses the bundled high-detail, CC BY 4.0 Staunton meshes by Jeyhun1985 from Sketchfab and retains procedural pieces as an automatic fallback if those assets are unavailable. Piece and board shaders support ceramic, anisotropic metal, and frosted dielectric materials, with recursive reflections, refraction, soft ray-traced shadows, and a caustic contribution for transmissive pieces.
VK_KHR_acceleration_structure and VK_KHR_ray_tracing_pipelineThe repository includes all six optimized meshes in assets/staunton/; no separate download or
Sketchfab account is required. Set CHESS_RTX_ASSET_DIR only if you want to use a different mesh
directory.
The mesh adaptations remain licensed under CC BY 4.0 rather than the project's software license. See asset attribution for the artist, individual source links, license, and a description of the geometry adaptations.
The interactive chess diagram uses Cburnett's standard 45×45 SVG chess-piece set from Wikimedia Commons. The vectors are rasterized at the display's native pixel size so they stay sharp on HiDPI screens. They are distributed under the BSD 3-Clause option offered by the original author; see 2D artwork attribution for sources, modifications, and the full license notice.
cargo run --release
Click a piece and then a highlighted destination to move. Drag the render to orbit, use the wheel to zoom, and use the control panel to edit the light/dark pieces and board independently. The interactive renderer automatically selects 1–16 rays per pixel to keep each full-resolution pass near the display's measured refresh interval. Ray tracing and readback run on a background thread, so a long pass does not block input or the vsynced UI loop. Passes are accumulated in linear HDR space and tone-mapped only for display; adaptive sampling can be disabled in the Optics controls.
For an offscreen render that does not create a window:
cargo run --release -- --headless renders/opening.png \
--width 1280 --height 800 --samples 4 --passes 256
Headless renders accept the same presets used by the UI, for example
--light-style glass --dark-style ceramic --board-style metal. --passes averages independent
progressive passes in linear HDR space for low-noise output.
Render an arbitrary position:
cargo run --release -- --headless position.png \
--fen 'r1bq1rk1/ppp2ppp/2np1n2/8/2B1P3/2N2N2/PPPP1PPP/R1BQ1RK1 b - - 2 7'
Run the CPU-side tests with cargo test.
New game: restore the standard positionUndo: restore the previous positionSave PNG: save the current frame in renders/Load FENsrc/rt.rs: Vulkan device, BLAS/TLAS, shader binding table, ray dispatch, and readbacksrc/assets.rs: glTF import, mesh simplification, native asset format, and runtime asset loadingsrc/board_pieces.rs: embedded, resolution-independent artwork for the interactive 2D boardsrc/scene.rs: licensed-piece integration, procedural fallback meshes, and board scenesrc/material.rs: editable GPU material and camera settingssrc/chess_game.rs: legal move interaction backed by the chess move generatorsrc/app.rs: wgpu-backed egui application and refresh-rate sampling policysrc/render_worker.rs: coalescing background thread for Vulkan rendering and readbackshaders/: GLSL ray generation, closest-hit, and miss stages compiled to SPIR-V at build time8 commits
Rust
94.6%
GLSL
5.4%