Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. .NET
  3. ComputeSharp

ComputeSharp

MITC#v3.2.0

A .NET library to run C# code in parallel on the GPU through DX12 and D2D1, generating HLSL shaders dynamically.

GitHubGitHub
3.2k stars151 forks0 contributors

What is ComputeSharp?

ComputeSharp is a .NET library that allows developers to write C# code that executes in parallel on the GPU by dynamically generating HLSL compute and pixel shaders. It provides APIs to access GPU devices, allocate buffers and textures, and move data between GPU and RAM, simplifying GPU programming for .NET applications. The library integrates with DirectX 12 and D2D1 to enable high-performance graphics and compute tasks.

Target Audience

.NET developers building applications that require GPU acceleration, such as scientific simulations, real-time graphics, audio visualizers, or image processing tools, particularly those targeting Windows platforms with UWP or WinUI.

Value Proposition

Developers choose ComputeSharp because it eliminates the need to write HLSL manually, offering a C#-first approach that reduces boilerplate and integrates seamlessly with the .NET ecosystem. Its production-ready status and adoption by major applications like the Microsoft Store and Paint.NET provide confidence in its stability and performance.

Overview

A .NET library to run C# code in parallel on the GPU through DX12, D2D1, and dynamically generated HLSL compute and pixel shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀

Use Cases

Best For

  • Accelerating image processing algorithms with custom pixel shaders
  • Building real-time audio visualizers or animated backgrounds
  • Performing scientific simulations or data parallel computations on the GPU
  • Creating custom visual effects for WinUI or UWP applications
  • Developing GPU-accelerated plugins for graphics applications like Paint.NET
  • Prototyping shaders quickly in C# without learning HLSL syntax

Not Ideal For

  • Cross-platform projects targeting Linux or macOS, as ComputeSharp relies on DirectX 12 and Windows APIs
  • Server-side applications in cloud environments without GPU passthrough or DirectX support
  • Simple 2D graphics where CPU-based rendering in frameworks like WPF or Avalonia suffices
  • Teams requiring extensive GPU debugging tools beyond PIX, as integration might be limited to Windows tooling

Pros & Cons

Pros

C#-First GPU Programming

Enables writing compute and pixel shaders entirely in C# without HLSL expertise, as stated in the README's key features, reducing boilerplate for .NET developers.

Production-Ready Stability

Powers major applications like the Microsoft Store and Paint.NET, showcasing real-world reliability and performance, as highlighted in the README's usage showcase.

Dynamic HLSL Generation

Automatically transpiles C# code to optimized HLSL at runtime, simplifying shader development and maintenance, a core feature emphasized in the description.

Multi-Package Ecosystem

Offers specialized packages for UWP, WinUI, DXC compilation, and PIX debugging, catering to diverse development needs, as listed in the available packages table.

Cons

Windows-Only Platform Lock

Tied to DirectX 12 and Windows APIs, making it unsuitable for cross-platform development, as all packages target UWP or WinUI environments exclusively.

Complex Initial Setup

Requires configuration of DirectX 12 and dependencies, and the multi-package structure can be overwhelming, as hinted by the need for separate extensions like D3D12MemoryAllocator.

GPU Concept Dependency

Despite abstraction, developers must still understand GPU parallelism and memory management to write efficient shaders, as the library doesn't fully hide underlying complexities.

Frequently Asked Questions

Quick Stats

Stars3,186
Forks151
Contributors0
Open Issues39
Last commit1 month ago
CreatedSince 2019

Tags

#graphics#library#shaders#csharp#netstandard#directx#visual-studio#gpgpu#directx12#gpu-computing#uwp#winui#hlsl#dotnet-library#parallel-processing#performance#gpu

Built With

U
UWP
H
HLSL
W
WinUI
D
DirectX 12
.
.NET

Included in

.NET21.2k
Auto-fetched 1 day ago

Related Projects

PollyPolly

Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.

Stars14,250
Forks1,297
Last commit6 days ago
HumanizerHumanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

Stars9,938
Forks1,067
Last commit6 days ago
Fluent ValidationFluent Validation

A popular .NET validation library for building strongly-typed validation rules.

Stars9,765
Forks1,276
Last commit12 days ago
CsvHelperCsvHelper

Library to help reading and writing CSV files

Stars5,208
Forks1,103
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub