Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Sergio0694
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
Sergio0694
6y ago
I have some more samples in the other folders, and I will also include some snippets in the updated docs (need to finish writing them and include them in the dev branch). Here's a couple examples: Super simple, complete examples of a s
2.
▲
by
Sergio0694
6y ago
You are correct: the way ComputeSharp works is that there is a Roslyn source generator that rewrites the shaders at build time from C# to HLSL (mapping types, methods, intrinsics, etc.), then shaders are compiled and cached at runtime (this
3.
▲
by
Sergio0694
6y ago
Awesome! If you find any particular problems feel free to open an issue on the repo (or ping me in the C# Discord server). Do make sure to grab one of the latest ComputeSharp 2.0 packages from the CI though and not the ones on NuGet, those
4.
▲
by
Sergio0694
6y ago
There are many key differences between the two which can be useful in different situations, so the advantages and disadvantages of either can depend on what you're trying to do as well. Here are some general differences, if it helps: -
5.
▲
by
Sergio0694
6y ago
ComputeSharp can run code on the CPU as well, through the DX12 WARP device ( https://docs.microsoft.com/windows/win32/direct3darticles/di... ). It's obviously not super performant compared to properly opti
6.
▲
by
Sergio0694
6y ago
If your algorithm is well parallelized, sure! Even a mobile GPU would likely be much faster in things such as image processing or other general purpose shaders than trying to run those on the CPU (which especially on mobile is likely not to
7.
▲
by
Sergio0694
6y ago
It is! ComputeSharp doesn't copy buffers automatically, and this is done on purpose to give you more control over when exactly to copy your data back and forth. You can either use normal resource types (eg. ReadWriteBuffer<T>) an