Sergio0694 / ComputeSharp

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! 🚀
MIT License
2.64k stars 122 forks source link

Add support for Direct2D Compute Shaders #351

Open rickbrew opened 1 year ago

rickbrew commented 1 year ago

Filing this for ... the future :)

At some point I'll want to start dipping my toe into compute shaders so I can convert the remaining CPU-based effects in Paint.NET over to the GPU. These effects require the use of compute shaders because they need to build a local histogram.

https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/Direct2D/custom-effects.md#adding-a-compute-shader-to-a-custom-transform

rickbrew commented 4 months ago

I have converted my remaining CPU-based effects over to the GPU by using compute shaders. Sadly without ComputeSharp.D2D1! But that means I am eager to port my interpolated strings over to proper CS.D2D1 shader structs, and I have compute shader HLSL code that can be used to validate this effort.

(btw "eager" does not mean "omg I need it now", there's not actually any time pressure here)