RepositoryPythonUSUnited States
CrossGL

CrossGL/crosstl

Translate GPU shaders and compute kernels between GLSL, HLSL, Metal, SPIR-V, Slang, CUDA and HIP, and to WGSL, through the CrossGL IR

2.3kstars
157forks
349issues
3views

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: hlsl

#1 Repository Của Tháng

1
TINIX TRENDING·Chủ đề: glsl

#1 Repository Của Tháng

1
TINIX TRENDING·Chủ đề: metal

#1 Repository Của Tháng

🔀 CrossTL: Universal Shader Translator

Convert shaders across GLSL, HLSL, Metal, SPIR-V and more with a single IR.

CrossTL is a Python library built around CrossGL, an intermediate representation that bridges graphics APIs and compute platforms. It provides source import and codegen backends for DirectX/HLSL, Metal, OpenGL/GLSL, Vulkan/SPIR-V, CUDA, HIP, Rust, Mojo, Slang, and WGSL, enabling round‑trip translation between native shader languages.

✨ Highlights

  • CrossGL IR: Central intermediate representation that unifies multiple shader languages.
  • Bidirectional backends: Source parsing and code generation for DirectX, Metal, and OpenGL.
  • Wide target support: Output to HLSL, MSL, GLSL, GLSL ES, WGSL, SPIR-V, CUDA, HIP, Rust, Mojo, Slang, and CrossGL.
  • Stage coverage: Handles vertex, fragment, compute, geometry, hull/domain, mesh/task, and ray‑tracing stages.
  • Resource model: Translates cbuffers, UAV/RW textures, structured buffers, atomics, and wave ops.
  • Round‑trip verified: Tested with unit suites ensuring parity across backends.

💡 Why it matters

CrossTL solves the headache of maintaining separate shader code for each platform by offering a single source that can be translated to many targets. Its first‑class bidirectional support for DirectX, Metal, and OpenGL means developers can import existing shaders and regenerate them without lossy conversions. The project is ideal for cross‑platform graphics engines, game development studios, and researchers who need to experiment with different GPU APIs without rewriting shaders.


#Shader #Translation #GPU #CrossGL #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
KhronosGroup/glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.

3.6k
Nov 17, 2026
RepositoryC++
microsoft/ShaderConductor

ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages

1.8k
Jan 13, 2023
RepositoryPython
apache/tvm

Open Machine Learning Compiler Framework

13.9k
Nov 22, 2026
RepositoryRust
gfx-rs/wgpu

A cross-platform, safe, pure-Rust graphics API.

18.6k
Nov 19, 2026
RepositoryC++
bkaradzic/bgfx

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

17.7k
Nov 23, 2026
RepositoryGLSL
SaschaWillems/Vulkan

C++ examples for the Vulkan graphics API

12.2k
Nov 9, 2026
RepositoryC++
shader-slang/slang

Making it easier to work with shaders

5.8k
Nov 17, 2026
RepositoryC++
crosire/reshade

A generic post-processing injector for games and video software.

5.7k
Sep 24, 2026
RepositoryRust
gfx-rs/gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.

5.4k
Feb 27, 2023