NorthRoc.DivisionCompute
0.1.1
dotnet add package NorthRoc.DivisionCompute --version 0.1.1
NuGet\Install-Package NorthRoc.DivisionCompute -Version 0.1.1
<PackageReference Include="NorthRoc.DivisionCompute" Version="0.1.1" />
<PackageVersion Include="NorthRoc.DivisionCompute" Version="0.1.1" />
<PackageReference Include="NorthRoc.DivisionCompute" />
paket add NorthRoc.DivisionCompute --version 0.1.1
#r "nuget: NorthRoc.DivisionCompute, 0.1.1"
#:package NorthRoc.DivisionCompute@0.1.1
#addin nuget:?package=NorthRoc.DivisionCompute&version=0.1.1
#tool nuget:?package=NorthRoc.DivisionCompute&version=0.1.1
DivisionCompute
Write your compute shaders in C#. Run them anywhere.
DivisionCompute is a source-to-source compiler and runtime that lets you write HLSL compute shaders directly in C#. It translates your C# code to HLSL at runtime, compiles it, and executes it on the GPU using Direct3D 11. It's designed as a drop-in replacement for ComputeSharp, offering you full control over the pipeline without being locked into a specific runtime.
This library is part of the Division Engine project.
✨ Features
- Write Shaders in C#: Use familiar C# syntax, structs, and methods to define your GPU kernels.
- Runtime Compilation: Compile new shaders on the fly without needing to restart your application or pre-compile.
- Cross-Platform Ready: The generated HLSL is compatible with multiple backends. The included runtime uses D3D11, but the core translation is backend-agnostic, paving the way for SPIR-V and other graphics APIs.
- Familiar API: The goal is a simple, intuitive API that feels like ComputeSharp, with methods for compiling shaders, binding resources, dispatching kernels, and reading back data.
- CPU/GPU Parity: Paired with the DivisionMath library, it ensures your shader math behaves identically on the CPU and GPU.
🚀 Getting Started
Prerequisites
- .NET 10.0 or later
- Windows (the current D3D11 runtime backend is Windows-only, but a cross-platform Vulkan backend is planned)
Installation
You can install DivisionCompute via NuGet:
dotnet add package NorthRoc.DivisionCompute
💖 Support
If you want to support DivisionCompute and the rest of the Division Engine ecosystem, sponsor me on GitHub:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.CodeAnalysis (>= 5.9.0)
- NorthRoc.DivisionMath (>= 0.2.0)
- Vortice.D3DCompiler (>= 3.8.3)
- Vortice.Direct3D11 (>= 3.8.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
README nuget badge hotfix